forked from http4k/http4k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
270 lines (233 loc) · 8.42 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath Libs.kotlin_gradle_plugin
classpath Libs.gradle_cobertura_plugin
classpath Libs.coveralls_gradle_plugin
classpath Libs.dokka_gradle_plugin
classpath Libs.com_jfrog_bintray_gradle_plugin
classpath Libs.openapi_generator_gradle_plugin
classpath Libs.kotlin_serialization
}
}
plugins {
id 'com.github.kt3k.coveralls' version "2.10.1"
id "com.jfrog.bintray" version "1.8.4"
id 'de.fayard.buildSrcVersions' version "0.7.0"
id 'net.saliman.cobertura' version "3.0.0"
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply plugin: 'cobertura'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'
jacoco {
toolVersion = '0.8.3'
}
cobertura.coverageFormats = ['html', 'xml']
cobertura.coverageSourceDirs = ['src/main/kotlin']
compileKotlin.kotlinOptions.jvmTarget = "1.8"
compileTestKotlin.kotlinOptions.jvmTarget = "1.8"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
version = project.hasProperty('releaseVersion') ? project.releaseVersion : 'LOCAL'
group = 'org.http4k'
test {
useJUnitPlatform()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
// task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask, overwrite: true, dependsOn: javadoc) {
// outputDirectory = javadoc.destinationDir
// outputFormat = "javadoc"
// processConfigurations = []
// }
// task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
// classifier = 'javadoc'
// from dokkaJavadoc.outputDirectory
// }
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task testJar(type: Jar) {
classifier "test"
from sourceSets.test.output
}
configurations {
testArtifacts.extendsFrom testRuntime
}
artifacts {
testArtifacts testJar
}
publishing {
publications {
mavenJava(MavenPublication) {
mavenJava(MavenPublication) {
artifactId = archivesBaseName
pom.withXml {
asNode().appendNode('name', archivesBaseName)
asNode().appendNode('description', description)
asNode().appendNode('url', 'https://http4k.org')
asNode().appendNode('developers')
.appendNode('developer').appendNode('name', 'Ivan Sanchez').parent().appendNode('email', '[email protected]')
.parent().parent()
.appendNode('developer').appendNode('name', 'David Denton').parent().appendNode('email', '[email protected]')
asNode().appendNode('scm').
appendNode('url', '[email protected]:http4k/' + archivesBaseName + '.git').parent().
appendNode('connection', 'scm:git:[email protected]:http4k/' + archivesBaseName + '.git').parent().
appendNode('developerConnection', 'scm:git:[email protected]:http4k/' + archivesBaseName + '.git')
asNode().appendNode('licenses').appendNode('license').
appendNode('name', 'Apache License, Version 2.0').parent().
appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.html')
}
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mavenJava']
dryRun = false
publish = true
pkg {
repo = 'maven'
userOrg = 'http4k'
name = project.name
desc = description
websiteUrl = 'https://github.com/http4k/http4k'
issueTrackerUrl = 'https://github.com/http4k/http4k/issues'
vcsUrl = 'https://github.com/http4k/http4k.git'
licenses = ['Apache-2.0']
labels = []
publicDownloadNumbers = true
version {
name = project.version
vcsTag = project.version
gpg {
sign = true
}
mavenCentralSync {
sync = false
user = System.getenv('SONATYPE_USER')
password = System.getenv('SONATYPE_KEY')
close = '1'
}
}
}
}
jacocoTestReport {
reports {
xml.enabled = true
}
}
}
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-Xjvm-default=enable"
}
coveralls {
sourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs).files.absolutePath
jacocoReportPath = file("${buildDir}/reports/jacoco/test/jacocoRootReport.xml")
}
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
getSourceDirectories().from(subprojects.sourceSets.main.allSource.srcDirs)
getClassDirectories().from(subprojects.sourceSets.main.output)
getExecutionData().from(subprojects.jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
xml.destination = file("${buildDir}/reports/jacoco/test/jacocoRootReport.xml")
}
}
dependencies {
compile project(":http4k-core")
compile project(":http4k-aws")
compile project(":http4k-client-apache")
compile project(":http4k-client-apache-async")
compile project(":http4k-client-jetty")
compile project(":http4k-client-okhttp")
compile project(":http4k-client-websocket")
compile project(":http4k-cloudnative")
compile project(":http4k-contract")
compile project(":http4k-format-argo")
compile project(":http4k-format-gson")
compile project(":http4k-format-jackson")
compile project(":http4k-format-jackson-xml")
compile project(":http4k-format-moshi")
compile project(":http4k-format-xml")
compile project(":http4k-incubator")
compile project(":http4k-jsonrpc")
compile project(":http4k-metrics-micrometer")
compile project(":http4k-multipart")
compile project(":http4k-resilience4j")
compile project(":http4k-security-oauth")
compile project(":http4k-server-apache")
compile project(":http4k-server-jetty")
compile project(":http4k-server-ktorcio")
compile project(":http4k-server-netty")
compile project(":http4k-server-undertow")
compile project(":http4k-serverless-lambda")
compile project(":http4k-template-dust")
compile project(":http4k-template-freemarker")
compile project(":http4k-template-handlebars")
compile project(":http4k-template-pebble")
compile project(":http4k-template-thymeleaf")
compile project(":http4k-template-dust")
compile project(":http4k-template-jade4j")
compile project(":http4k-testing-approval")
compile project(":http4k-testing-chaos")
compile project(":http4k-testing-hamkrest")
compile project(":http4k-testing-servirtium")
compile project(":http4k-testing-webdriver")
testCompile Config.TestDependencies
testCompile project(path: ":http4k-testing-servirtium", configuration: 'testArtifacts')
}
sourceSets {
test {
kotlin {
srcDirs 'src/test/kotlin'
srcDirs 'src/docs'
}
resources {
srcDir 'src/docs'
}
}
}
dokka {
outputFormat = "gfm"
outputDirectory = "$buildDir/ddoc"
subProjects = subprojects.collect { i -> i.name }
configuration {
includes = ['src/packages.md']
moduleName = "$rootProject.name"
jdkVersion = 9
}
}
buildSrcVersions {
indent = " "
}
// To update Gradle, run `$ ./gradlew :buildSrcVersions && ./gradlew wrapper`
wrapper {
gradleVersion = Versions.gradleLatestVersion
distributionType = Wrapper.DistributionType.ALL
}