Skip to content

Commit f9a8622

Browse files
committed
code review
1 parent a476600 commit f9a8622

File tree

8 files changed

+141
-199
lines changed

8 files changed

+141
-199
lines changed

build.gradle.kts

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
plugins {
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

1211
group = "org.springdoc"
@@ -46,19 +45,20 @@ publishing {
4645
}
4746

4847
dependencies {
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

6464
gradlePlugin {
@@ -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

9094
detekt {
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+
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
java=11
21
kotlin.code.style=official
32
org.gradle.caching=true
43
org.gradle.parallel=true

gradle/wrapper/gradle-wrapper.jar

-2.32 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4-
networkTimeout=10000
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
54
zipStoreBase=GRADLE_USER_HOME
65
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)