-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild.gradle
217 lines (178 loc) · 5.97 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
buildscript {
repositories {
mavenCentral()
mavenLocal()
if (project.hasProperty('fatJar')) jcenter()
}
dependencies {
classpath "pl.allegro.tech.build:axion-release-plugin:1.4.1"
classpath "com.bmuschko:gradle-nexus-plugin:2.3"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
if (project.hasProperty('fatJar')) classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
apply plugin: "pl.allegro.tech.build.axion-release"
scmVersion {
tag { prefix = "accurest" }
createReleaseCommit = true
releaseCommitMessage { version, position -> "Release version: ${version}\n\n[ci skip]" }
hooks {
pre "fileUpdate", [file : "README.md",
pattern : { v, p -> /'io\.codearte\.accurest:accurest-gradle-plugin:.*'/ },
replacement: { v, p -> "'io.codearte.accurest:accurest-gradle-plugin:$v'" }]
}
}
allprojects {
project.version = scmVersion.version
}
apply plugin: 'io.codearte.nexus-staging'
nexusStaging {
packageGroup = "io.codearte"
stagingProfileId = '93c08fdebde1ff'
}
apply from: "$rootDir/gradle/releaseRoot.gradle"
subprojects {
apply plugin: 'groovy'
apply from: "$rootDir/gradle/release.gradle"
group = 'io.codearte.accurest'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "http://repo.spring.io/milestone"
}
}
//Dependencies in all subprojects - http://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/
task allDeps(type: DependencyReportTask) {}
task allInsight(type: DependencyInsightReportTask) {}
dependencies {
compile localGroovy()
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude(group: 'org.codehaus.groovy')
}
testCompile 'info.solidsoft.spock:spock-global-unroll:0.5.0'
}
test {
testLogging {
exceptionFormat = 'full'
}
}
// fixing the groovydoc issue http://stackoverflow.com/questions/20618857/gradle-task-groovydoc-failing-with-noclassdeffounderror
configurations {
jansi.extendsFrom(runtime)
}
groovydoc {
def title = "IPDS ${version}"
groovyClasspath = project.configurations.jansi
}
dependencies {
jansi 'org.fusesource.jansi:jansi:1.11'
}
}
project(':accurest-core') {
dependencies {
compile 'org.slf4j:slf4j-api:1.6.0'
compile 'commons-io:commons-io:2.0'
compile 'org.apache.commons:commons-lang3:3.3'
compile "com.github.tomakehurst:wiremock:$wiremockVersion"
compile "com.toomuchcoding.jsonassert:jsonassert:$jsonassertVersion"
compile 'org.codehaus.groovy:groovy-all:2.4.10'
testCompile 'cglib:cglib-nodep:2.2'
testCompile 'org.objenesis:objenesis:2.1'
testCompile project(':accurest-testing-utils')
}
}
project(':accurest-testing-utils') {
dependencies {
compile 'org.skyscreamer:jsonassert:1.2.3'
}
}
project(':accurest-converters') {
dependencies {
compile project(':accurest-core')
compile 'org.apache.commons:commons-lang3:3.0'
compile 'commons-io:commons-io:2.0'
compile 'dk.brics.automaton:automaton:1.11-8' // needed for Xeger
testCompile "com.github.tomakehurst:wiremock:$wiremockVersion"
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
}
project(':accurest-gradle-plugin') {
ext.messagingLibsDir ="$buildDir/messaging-libs"
ext.accurestGradlePluginLibsDir ="$buildDir/accurest-gradle-plugin-libs"
ext.testSystemProperties = [
'accurest-gradle-plugin-libs-dir': accurestGradlePluginLibsDir,
'messaging-libs-dir': messagingLibsDir
]
dependencies {
compile project(':accurest-core')
compile project(':accurest-converters')
compile gradleApi()
testCompile gradleTestKit()
testCompile project(':accurest-testing-utils')
}
configurations {
messagingLibs
accurestGradlePluginLibs
}
dependencies {
messagingLibs project(':accurest-messaging-root:accurest-messaging-integration')
messagingLibs project(':accurest-messaging-root:accurest-messaging-core')
messagingLibs project(':accurest-testing-utils')
messagingLibs 'org.codehaus.groovy:groovy-all:2.4.10'
accurestGradlePluginLibs project(':accurest-gradle-plugin')
}
test {
exclude '**/*FunctionalSpec.*'
systemProperties = testSystemProperties
}
task funcTest(type: Test) {
include '**/*FunctionalSpec.*'
systemProperties = testSystemProperties
reports.html {
destination = file("${reporting.baseDir}/funcTests")
}
}
task archiveMessagingLibsDependencies(type: Sync) {
from configurations.messagingLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
into messagingLibsDir
}
task archiveAccurestGradlePluginLibsDependencies(type: Sync) {
from configurations.accurestGradlePluginLibs.resolvedConfiguration.resolvedArtifacts.collect { it.file }
into accurestGradlePluginLibsDir
}
// archive task needs to have jars ready
archiveMessagingLibsDependencies.dependsOn project(':accurest-messaging-root:accurest-messaging-integration').tasks.jar
archiveAccurestGradlePluginLibsDependencies.dependsOn project(':accurest-gradle-plugin').tasks.jar
test.dependsOn archiveMessagingLibsDependencies, archiveAccurestGradlePluginLibsDependencies
funcTest.dependsOn archiveMessagingLibsDependencies, archiveAccurestGradlePluginLibsDependencies
uploadArchives.dependsOn { funcTest }
}
configurations {
all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
// To prevent an accidental usage of groovy-all.jar and groovy.jar in different versions
// all modularized Groovy jars are replaced with groovy-all.jar by default.
if (details.requested.group == 'org.codehaus.groovy' && details.requested.name != "groovy-all") {
details.useTarget("org.codehaus.groovy:groovy-all:${details.requested.version}")
}
}
}
}
}
// REMOVE AFTER https://issues.gradle.org/browse/GRADLE-3433 IS FIXED
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.palantir.ideatestfix:gradle-idea-test-fix:0.1.0"
}
}
apply plugin: "com.palantir.idea-test-fix"