@@ -15,14 +15,17 @@ buildscript {
15
15
classpath(" com.google.protobuf:protobuf-gradle-plugin:0.8.15" )
16
16
}
17
17
}
18
+
19
+ val buildKotlinVersion: String by extra
20
+
18
21
plugins {
19
22
id(" org.jetbrains.kotlin.jvm" ) version " 1.4.32"
20
23
id(" org.jetbrains.kotlin.plugin.allopen" ) version " 1.4.32"
21
24
id(" org.jlleitschuh.gradle.ktlint" ) version " 10.1.0"
22
25
id(" org.jetbrains.dokka" ) version " 1.4.32"
23
- id(" com.github.hierynomus.license-base" ).version(" 0.15.0 " )
24
- id(" com.github.spotbugs" ) version " 4.7.1 "
25
- id(" io.gitlab.arturbosch.detekt" ) version " 1.16.0 "
26
+ id(" com.github.hierynomus.license-base" ).version(" 0.16.1 " )
27
+ id(" com.github.spotbugs" ) version " 4.7.2 "
28
+ id(" io.gitlab.arturbosch.detekt" ) version " 1.18.0-RC2 "
26
29
signing
27
30
`maven- publish`
28
31
`java- library`
@@ -57,10 +60,8 @@ subprojects {
57
60
apply (plugin = " maven-publish" )
58
61
apply (plugin = " distribution" )
59
62
apply (plugin = " org.jetbrains.kotlin.jvm" )
60
- // apply(plugin = "org.jlleitschuh.gradle.ktlint")
61
63
apply (plugin = " org.jetbrains.dokka" )
62
64
apply (plugin = " com.github.hierynomus.license-base" )
63
- // apply(plugin = "checkstyle")
64
65
apply (plugin = " jacoco" )
65
66
if (! isKotlinModule(this )) {
66
67
// logger.warn("This project is not kotlin: ${this.name}")
@@ -74,19 +75,28 @@ subprojects {
74
75
}
75
76
if (isKotlinModule(this )) {
76
77
apply (plugin = " io.gitlab.arturbosch.detekt" )
78
+ detekt {
79
+ // Version of Detekt that will be used. When unspecified the latest detekt
80
+ // version found will be used. Override to stay on the same version.
81
+ toolVersion = " 1.18.0-RC2"
82
+
83
+ // The directories where detekt looks for source files.
84
+ // Defaults to `files("src/main/java", "src/main/kotlin")`.
85
+ input = files(" src/main/java" , " src/main/kotlin" )
86
+ config = files(" ${rootDir.path} /detektConfig.yml" )
87
+ }
77
88
}
78
89
tasks.withType< com.hierynomus.gradle.license.tasks.LicenseFormat > ().configureEach {
79
90
this .header = File (this .project.rootDir, " HEADER" )
80
91
this .exclude(" *.xml" , " *.json" )
81
92
this .mapping(mapOf (" java" to " SLASHSTAR_STYLE" , " kt" to " SLASHSTAR_STYLE" ))
82
93
}
83
94
84
- // if("floodplain-elasticsearch" != name) {
85
95
tasks.test {
86
96
useJUnitPlatform()
87
97
jvmArgs(" --enable-preview" )
88
98
}
89
- // }
99
+
90
100
tasks.withType< com.hierynomus.gradle.license.tasks.LicenseCheck > ().configureEach {
91
101
this .header = File (this .project.rootDir, " HEADER" )
92
102
this .exclude(" *.xml" , " *.json" )
@@ -112,10 +122,6 @@ subprojects {
112
122
113
123
val dokkaHtml by tasks.getting(org.jetbrains.dokka.gradle.DokkaTask ::class )
114
124
115
- // val dokkaHtml = tasks.named<org.jetbrains.dokka.gradle.DokkaTask>("dokkaHtml").configure {
116
- // // outputDirectory = buildDir.resolve("dokka").absolutePath
117
- // }
118
-
119
125
tasks {
120
126
val sourcesJar by creating(Jar ::class ) {
121
127
archiveClassifier.set(" sources" )
@@ -187,17 +193,6 @@ subprojects {
187
193
}
188
194
}
189
195
190
- detekt {
191
- // Version of Detekt that will be used. When unspecified the latest detekt
192
- // version found will be used. Override to stay on the same version.
193
- toolVersion = " 1.18.0-RC2"
194
-
195
- // The directories where detekt looks for source files.
196
- // Defaults to `files("src/main/java", "src/main/kotlin")`.
197
- input = files(" src/main/java" , " src/main/kotlin" )
198
- config = files(" ${projectDir.path} /detektConfig.yml" )
199
- }
200
-
201
196
fun customizePom (publication : MavenPublication ) {
202
197
with (publication.pom) {
203
198
withXml {
@@ -237,7 +232,7 @@ fun customizePom(publication: MavenPublication) {
237
232
}
238
233
239
234
val detektAll by tasks.registering(Detekt ::class ) {
240
- this .config.setFrom(" ${projectDir .path} /detektConfig.yml" )
235
+ this .config.setFrom(" ${rootDir .path} /detektConfig.yml" )
241
236
description = " Runs over whole code base without the starting overhead for each module."
242
237
parallel = true
243
238
buildUponDefaultConfig = true
@@ -348,7 +343,7 @@ tasks.register<JacocoReport>("codeCoverageReport") {
348
343
tasks.withType<Test > {
349
344
useJUnitPlatform {
350
345
includeEngines = setOf (" junit-jupiter" )
351
- // this.includeTags = setOf("*")
346
+ // this.includeTags = setOf("*")
352
347
}
353
348
testLogging {
354
349
events(" passed" , " skipped" , " failed" )
0 commit comments