forked from tsc4j/tsc4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
185 lines (143 loc) · 5.6 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
//
// build.gradle
//
buildscript {
ext {
groovyVersion = "2.5.14"
groovy3Version = "3.0.7"
spockVersion = "1.3-groovy-2.5"
spock2Version = "2.0-M4-groovy-3.0"
typesafeConfigVersion = "1.4.1"
slf4jVersion = "1.7.28"
lombokVersion = "1.18.20"
awsSdkVersion = "1.11.475"
guiceVersion = "4.2.3"
logbackVersion = "1.2.3"
jacksonVersion = "2.9.9"
picocliVersion = "4.6.1"
micronautVersion = "1.2.0"
micronaut2Version = "2.3.0"
googleCloudBomVersion = "0.107.0-alpha"
googleGcpVersion = "1.89.0"
springBootVersion = "2.1.0.RELEASE"
springCloudVersion = "Greenwich.SR2"
jacocoVersion = "0.8.6"
}
}
plugins {
id "java-library"
id "net.researchgate.release" version "2.8.1"
id "io.spring.dependency-management" version "1.0.11.RELEASE"
id "org.beryx.jar" version "1.2.0"
id "ru.vyarus.pom" version "2.1.0"
id "io.freefair.lombok" version "5.3.0"
id "com.adarshr.test-logger" version "2.1.1" apply false
id "com.github.johnrengelman.shadow" version "6.1.0" apply false
id "com.gorylenko.gradle-git-properties" version "2.2.4" apply false
id "com.jfrog.bintray" version "1.8.5" apply false
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "java-library"
apply plugin: "groovy"
apply plugin: "jacoco"
apply plugin: "io.spring.dependency-management"
// required for spock tests to execute successfuly
// see: https://stackoverflow.com/questions/50681096/groovy-2-5-0-gives-noclassdeffounderror-for-methodcalltransformation
ext['groovy.version'] = "${groovyVersion}"
repositories {
mavenLocal()
mavenCentral()
}
dependencyManagement {
imports {
mavenBom "com.amazonaws:aws-java-sdk-bom:${awsSdkVersion}"
mavenBom "com.fasterxml.jackson:jackson-bom:${jacksonVersion}"
mavenBom "com.google.cloud:google-cloud-bom:${googleCloudBomVersion}"
mavenBom "org.spockframework:spock-bom:${spockVersion}"
}
dependencies {
dependency "com.typesafe:config:${typesafeConfigVersion}"
dependency "org.projectlombok:lombok:${lombokVersion}"
dependency "ch.qos.logback:logback-classic:${logbackVersion}"
dependency "info.picocli:picocli:${picocliVersion}"
dependency "info.picocli:picocli-codegen:${picocliVersion}"
dependency "co.wrisk.jcredstash:jcredstash:0.0.4"
dependency "com.google.cloud:google-cloud-storage:${googleGcpVersion}"
dependency "org.apache.httpcomponents:httpclient:4.5.5"
dependency "commons-io:commons-io:2.6"
dependency "org.objenesis:objenesis:3.0.1"
dependency "cglib:cglib-nodep:3.2.5"
dependency "javax.inject:javax.inject:1"
// JDK11 compatibility
dependency "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
dependency "javax.annotation:jsr250-api:1.0"
dependency "javax.annotation:javax.annotation-api:1.3.2"
dependency "jakarta.annotation:jakarta.annotation-api:1.3.5"
dependencySet(group: "org.codehaus.groovy", version: "${groovyVersion}") {
entry "groovy"
entry "groovy-test"
entry "groovy-json"
entry "groovy-nio"
entry "groovy-templates"
entry "groovy-sql"
entry "groovy-xml"
}
dependencySet(group: "org.slf4j", version: "${slf4jVersion}") {
entry "slf4j-api"
entry "jcl-over-slf4j"
}
}
}
// common dependencies
dependencies {
// lombok is added by default by gradle/lombok.gradle
// @Inject support
compileOnly "javax.annotation:jsr250-api"
// lombok @Generated support
compileOnly "javax.annotation:javax.annotation-api"
testImplementation "org.codehaus.groovy:groovy-test"
testImplementation "org.spockframework:spock-core"
testImplementation "ch.qos.logback:logback-classic"
testImplementation "commons-io:commons-io"
testImplementation "cglib:cglib-nodep:3.3.0"
}
sourceSets {
// add compileOnly dependencies to test runtime classpath
test.compileClasspath += configurations.compileClasspath
test.runtimeClasspath += configurations.compileClasspath
}
ext.hasSources = !sourceSets.main.allSource.files.isEmpty()
ext.hasTests = !sourceSets.test.allSource.files.isEmpty()
ext.isReleaseVersion = !version.endsWith("-SNAPSHOT")
// disable gradle publish artifact metadata generation
tasks.withType(GenerateModuleMetadata) { enabled = false }
apply from: "${rootDir}/gradle/functions.gradle"
apply from: "${rootDir}/gradle/lombok.gradle"
apply from: "${rootDir}/gradle/subproject-java.gradle"
apply from: "${rootDir}/gradle/subproject-jar.gradle"
apply from: "${rootDir}/gradle/subproject-testing.gradle"
}
subprojects {
//println("SUBPROJECTS: ${project.name}: sourceS: ${hasSources}")
// enable publishing for subprojects that have something to publish :-)
if (hasSources) {
apply from: "${rootDir}/gradle/subproject-javadoc.gradle"
apply from: "${rootDir}/gradle/subproject-maven-publish.gradle"
}
// enable jacoco code coverage
apply from: "${rootDir}/gradle/subproject-jacoco.gradle"
}
// aggregate jacoco reports on the top level
apply from: "gradle/aggregate-jacoco-reports.gradle"
release {
tagTemplate = 'v${version}'
failOnSnapshotDependencies = true
git {
// allow releases from any branch
requireBranch = ''
}
}
// vim:shiftwidth=2 softtabstop=2 expandtab
// EOF