Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
bnasslahsen committed Dec 14, 2022
1 parent a476600 commit f9a8622
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 199 deletions.
49 changes: 28 additions & 21 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
`java-gradle-plugin`
`maven-publish`
kotlin("jvm") version "1.8.0-RC"
id ("com.palantir.idea-test-fix") version "0.1.0"
id("com.gradle.plugin-publish") version "0.14.0"
id("org.sonarqube") version "3.5.0.2730"
id("com.github.ben-manes.versions") version "0.44.0"
id("io.gitlab.arturbosch.detekt") version "1.22.0"
id("org.sonarqube") version "3.1.1"
kotlin("jvm") version "1.4.31"
`maven-publish`
id("com.github.ben-manes.versions") version "0.38.0"
id("io.gitlab.arturbosch.detekt") version "1.16.0"
}

group = "org.springdoc"
Expand Down Expand Up @@ -46,19 +45,20 @@ publishing {
}

dependencies {
implementation("com.google.code.gson:gson:2.10")
implementation("org.awaitility:awaitility-kotlin:4.2.0")
implementation(kotlin("reflect"))
implementation("com.google.code.gson:gson:2.8.6")
implementation("org.awaitility:awaitility-kotlin:4.0.3")
implementation("com.github.psxpaul:gradle-execfork-plugin:0.2.0")
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.7.6")
implementation("jakarta.platform:jakarta.jakartaee-api:10.0.0")
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.5.6")

testImplementation(gradleTestKit())
testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
testImplementation("com.beust:klaxon:5.6")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.1")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.1")
testImplementation(platform("org.junit:junit-bom:5.7.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("com.beust:klaxon:5.5")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.2")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.2")

detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0")
}

gradlePlugin {
Expand All @@ -78,16 +78,23 @@ pluginBundle {
tags = listOf("springdoc", "openapi", "swagger")
}

val jvmVersion: JavaLanguageVersion = JavaLanguageVersion.of(8)

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.${jvmVersion.toString()}"
}
}

tasks{
val java: String by project
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { kotlinOptions { jvmTarget = java } }
withType<io.gitlab.arturbosch.detekt.Detekt> { jvmTarget = java }
withType<Test>().configureEach { useJUnitPlatform() }
// withType<Jar> { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
tasks.withType<Test>().configureEach {
useJUnitPlatform()
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
}

detekt {
config = files("config/detekt/detekt.yml")
parallel = true
}
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
jvmTarget = "1.${jvmVersion.toString()}"
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
java=11
kotlin.code.style=official
org.gradle.caching=true
org.gradle.parallel=true
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f9a8622

Please sign in to comment.