-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
156 lines (117 loc) · 4.35 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
buildscript {
repositories {
jcenter()
maven { name = 'Defaults Plugin Repo'; url = 'http://dl.bintray.com/jmoore/java-lib' }
maven { name = 'Gradle Plugin Portal'; url = 'https://plugins.gradle.org/m2/' }
mavenLocal()
}
dependencies {
classpath 'com.mooregreatsoftware:gradle-defaults:3.0.0'
classpath 'ru.vyarus:gradle-quality-plugin:1.3.0'
}
}
plugins {
id 'com.jfrog.bintray' version '1.4'
id "us.kirchmeier.capsule" version "1.0.2"
// jruby plugin needed for asciidoctor-diagram gem.
id 'com.github.jruby-gradle.base' version '1.2.1'
}
group = 'com.twcable.grabbit'
description = 'Command line interface for interacting with the Grabbit Client'
// need Groovy instead of just Java for Spock testing
apply plugin: 'groovy'
dependencies {
// command-line argument parsing
compile 'commons-cli:commons-cli:1.3.1'
// YAML/JSON parsing
compile 'org.yaml:snakeyaml:1.17'
// The core Reactive Streams interfaces
// http://www.reactive-streams.org/
compile "org.reactivestreams:reactive-streams:1.0.0"
// Implementation of Reactive Streams
// http://projectreactor.io/
compile "io.projectreactor:reactor-core:2.5.0.M4"
// Spock testing
// http://docs.spockframework.org/
testCompile "org.codehaus.groovy:groovy-all:2.4.6"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4", {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
}
apply plugin: 'com.mooregreatsoftware.defaults'
apply from: "gradle/quality.gradle"
apply from: "gradle/docs.gradle"
defaultTasks 'build'
defaults {
openSource = true
compatibilityVersion = '1.8'
lombok.enabled = true
checkerFramework.enabled = true
orgId = 'twcable'
orgName = 'Time Warner Cable'
orgUrl = 'http://www.timewarnercable.com'
bintrayRepo = 'aem'
bintrayLabels = ['grabbit', 'aem']
developers = [
[id: 'jmoore', name: 'Jim Moore', email: '[email protected]'],
]
copyrightYears = '2014-2016'
}
task fatCapsule(type: FatCapsule) {
archiveName = "grabbit-cli-${version}"
applicationClass "com.twcable.grabbit.tools.cli.GrabbitCli"
capsuleManifest {
minJavaVersion = defaults.compatibilityVersion
}
manifest = jar.manifest
reallyExecutable
}
assemble.dependsOn fatCapsule
bintray {
filesSpec {
from fatCapsule.archivePath
into '/bin'
}
pkg {
licenses = ['Apache-2.0']
attributes = ['plat': ['jvm', 'aem', 'grabbit', 'cq']]
}
}
license {
exclude "**/*.json"
}
idea.project.ipr {
withXml { provider ->
def inspections = provider.node.component
.find { it.@name == 'InspectionProjectProfileManager' }
if (!inspections) {
inspections = provider.node.appendNode 'component', [name: "InspectionProjectProfileManager"]
inspections.appendNode 'option', [name: "PROJECT_PROFILE", value: "Project Default"]
inspections.appendNode 'option', [name: "USE_PROJECT_PROFILE", value: true]
inspections.appendNode 'version', [value: "1.0"]
}
def inspectionsProfile = inspections.get("profile")
if (!inspectionsProfile) {
inspectionsProfile = inspections.appendNode 'profile', [version: "1.0"]
inspectionsProfile.appendNode 'option', [name: "myName", value: "Project Default"]
inspectionsProfile.appendNode 'option', [name: "myLocal", value: "true"]
}
def inspectionTool = inspectionsProfile.inspection_tool
if (!inspectionTool) {
inspectionsProfile.appendNode 'inspection_tool', [class: "GroovyAssignabilityCheck", enabled: false, level: "WARNING", enabled_by_default: false]
}
else {
def groovyAssignabilityCheck = inspectionTool.find { it.@class == 'GroovyAssignabilityCheck' }
if (!groovyAssignabilityCheck) {
inspectionsProfile.add new NodeBuilder().inspection_tool(class: "GroovyAssignabilityCheck", enabled: false, level: "WARNING", enabled_by_default: false)
//inspectionsProfile.add new NodeBuilder().inspection_tool(class: "GroovyAssignabilityCheck", enabled: false)
}
else {
groovyAssignabilityCheck.@enabled = false
}
}
}
}
wrapper {
gradleVersion = "2.14.1"
}