diff --git a/build.gradle.kts b/build.gradle.kts index b32f4953..7dc86aa6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,10 +2,10 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.jetbrains.dokka.gradle.DokkaTask plugins { - id("org.jetbrains.kotlin.jvm") version "1.6.0" // Apply the Kotlin JVM plugin to add support for Kotlin. - id("com.github.johnrengelman.shadow") version "4.0.1" - id("org.jetbrains.dokka") version "0.10.1" - id("com.palantir.git-version") version "0.12.3" + id("org.jetbrains.kotlin.jvm") version "1.8.20" // Apply the Kotlin JVM plugin to add support for Kotlin. + id("com.github.johnrengelman.shadow") version "8.1.1" + id("org.jetbrains.dokka") version "1.8.10" + id("com.palantir.git-version") version "3.0.0" id("maven-publish") id("signing") @@ -37,7 +37,7 @@ dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom")) implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") - implementation("com.github.jknack:handlebars:4.1.0") + implementation("com.github.jknack:handlebars:4.3.1") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion") @@ -45,9 +45,9 @@ dependencies { implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion") implementation("com.beust:jcommander:1.82") implementation("com.reprezen.kaizen:openapi-parser:4.0.4") { exclude(group = "junit") } - implementation("com.reprezen.jsonoverlay:jsonoverlay:4.0.3") - implementation("com.squareup:kotlinpoet:1.3.0") { exclude(module = "kotlin-stdlib-jre7") } - implementation("com.google.flogger:flogger:0.4") + implementation("com.reprezen.jsonoverlay:jsonoverlay:4.0.4") + implementation("com.squareup:kotlinpoet:1.12.0") { exclude(module = "kotlin-stdlib-jre7") } + implementation("com.google.flogger:flogger:0.7.4") testImplementation("org.junit.jupiter:junit-jupiter-api:5.1.0") testImplementation("org.junit.jupiter:junit-jupiter-engine:5.1.0") @@ -57,14 +57,14 @@ dependencies { // Below dependencies are solely present so code examples in the test resources dir compile testImplementation("javax.validation:validation-api:2.0.1.Final") testImplementation("jakarta.validation:jakarta.validation-api:3.0.2") - testImplementation("org.springframework:spring-webmvc:5.1.9.RELEASE") - testImplementation("org.springframework.security:spring-security-web:5.4.0") - testImplementation("io.micronaut:micronaut-core:3.8.4") - testImplementation("io.micronaut:micronaut-http:3.8.4") - testCompileOnly("io.micronaut.security:micronaut-security:3.8.3") - testImplementation("com.squareup.okhttp3:okhttp:4.9.1") - testImplementation("com.pinterest.ktlint:ktlint-core:0.41.0") - testImplementation("com.pinterest:ktlint:0.41.0") + testImplementation("org.springframework:spring-webmvc:6.0.0") + testImplementation("org.springframework.security:spring-security-web:6.0.0") + testImplementation("io.micronaut:micronaut-core:3.8.7") + testImplementation("io.micronaut:micronaut-http:3.8.7") + testCompileOnly("io.micronaut.security:micronaut-security:3.8.7") + testImplementation("com.squareup.okhttp3:okhttp:4.10.0") + testImplementation("com.pinterest.ktlint:ktlint-core:0.48.2") + testImplementation("com.pinterest:ktlint:0.48.2") testImplementation("org.openapitools:jackson-databind-nullable:0.2.6") } @@ -81,9 +81,8 @@ tasks { archiveClassifier.set("") } - val dokka by getting(DokkaTask::class) { - outputFormat = "html" - outputDirectory = "$buildDir/dokka" + val dokka = getByName("dokkaHtml") { + outputDirectory.set(file("$buildDir/dokka")) } create("sourcesJar", Jar::class) { @@ -102,7 +101,7 @@ tasks { create("printCodeGenUsage", JavaExec::class) { dependsOn(shadowJar) classpath = project.files("./build/libs/$executableName-$version.jar") - main = "com.cjbooms.fabrikt.cli.CodeGen" + mainClass.set("com.cjbooms.fabrikt.cli.CodeGen") args = listOf("--help") } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 12d38de6..e1bef7e8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/kotlin/com/cjbooms/fabrikt/generators/GeneratorUtils.kt b/src/main/kotlin/com/cjbooms/fabrikt/generators/GeneratorUtils.kt index 687806a3..bff0b4fa 100644 --- a/src/main/kotlin/com/cjbooms/fabrikt/generators/GeneratorUtils.kt +++ b/src/main/kotlin/com/cjbooms/fabrikt/generators/GeneratorUtils.kt @@ -112,7 +112,7 @@ object GeneratorUtils { private fun Schema.toClassName() = KotlinTypeInfo.from(this).modelKClass.asTypeName() - fun String.toClassName(basePackage: String) = ClassName(packageName = basePackage, simpleName = this) + fun String.toClassName(basePackage: String) = ClassName(packageName = basePackage, this) fun RequestBody.getPrimaryContentMediaType(): Map.Entry? = this.contentMediaTypes.entries.firstOrNull()