11plugins {
22 `java- gradle- plugin`
3- `maven- publish`
4- kotlin(" jvm" ) version " 1.8.0-RC"
5- id (" com.palantir.idea-test-fix" ) version " 0.1.0"
63 id(" com.gradle.plugin-publish" ) version " 0.14.0"
7- id(" org.sonarqube" ) version " 3.5.0.2730"
8- id(" com.github.ben-manes.versions" ) version " 0.44.0"
9- id(" io.gitlab.arturbosch.detekt" ) version " 1.22.0"
4+ id(" org.sonarqube" ) version " 3.1.1"
5+ kotlin(" jvm" ) version " 1.4.31"
6+ `maven- publish`
7+ id(" com.github.ben-manes.versions" ) version " 0.38.0"
8+ id(" io.gitlab.arturbosch.detekt" ) version " 1.16.0"
109}
1110
1211group = " org.springdoc"
@@ -46,19 +45,20 @@ publishing {
4645}
4746
4847dependencies {
49- implementation(" com.google.code.gson:gson:2.10" )
50- implementation(" org.awaitility:awaitility-kotlin:4.2.0" )
48+ implementation(kotlin(" reflect" ))
49+ implementation(" com.google.code.gson:gson:2.8.6" )
50+ implementation(" org.awaitility:awaitility-kotlin:4.0.3" )
5151 implementation(" com.github.psxpaul:gradle-execfork-plugin:0.2.0" )
52- implementation(" org.springframework.boot:spring-boot-gradle-plugin:2.7.6" )
53- implementation(" jakarta.platform:jakarta.jakartaee-api:10.0.0" )
52+ implementation(" org.springframework.boot:spring-boot-gradle-plugin:2.5.6" )
5453
5554 testImplementation(gradleTestKit())
56- testImplementation(" org.junit.jupiter:junit-jupiter:5.9.1" )
57- testImplementation(" com.beust:klaxon:5.6" )
58- testImplementation(" com.fasterxml.jackson.module:jackson-module-kotlin:2.14.1" )
59- testImplementation(" com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.1" )
55+ testImplementation(platform(" org.junit:junit-bom:5.7.1" ))
56+ testImplementation(" org.junit.jupiter:junit-jupiter" )
57+ testImplementation(" com.beust:klaxon:5.5" )
58+ testImplementation(" com.fasterxml.jackson.module:jackson-module-kotlin:2.13.2" )
59+ testImplementation(" com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.2" )
6060
61- detektPlugins(" io.gitlab.arturbosch.detekt:detekt-formatting:1.22 .0" )
61+ detektPlugins(" io.gitlab.arturbosch.detekt:detekt-formatting:1.16 .0" )
6262}
6363
6464gradlePlugin {
@@ -78,16 +78,23 @@ pluginBundle {
7878 tags = listOf (" springdoc" , " openapi" , " swagger" )
7979}
8080
81+ val jvmVersion: JavaLanguageVersion = JavaLanguageVersion .of(8 )
82+
83+ tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
84+ kotlinOptions {
85+ jvmTarget = " 1.${jvmVersion.toString()} "
86+ }
87+ }
8188
82- tasks{
83- val java: String by project
84- withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > ().configureEach { kotlinOptions { jvmTarget = java } }
85- withType< io.gitlab.arturbosch.detekt.Detekt > { jvmTarget = java }
86- withType<Test >().configureEach { useJUnitPlatform() }
87- // withType<Jar> { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
89+ tasks.withType<Test >().configureEach {
90+ useJUnitPlatform()
91+ maxParallelForks = (Runtime .getRuntime().availableProcessors() / 2 ).takeIf { it > 0 } ? : 1
8892}
8993
9094detekt {
9195 config = files(" config/detekt/detekt.yml" )
9296 parallel = true
9397}
98+ tasks.withType< io.gitlab.arturbosch.detekt.Detekt > ().configureEach {
99+ jvmTarget = " 1.${jvmVersion.toString()} "
100+ }
0 commit comments