diff --git a/.gitignore b/.gitignore index f2947eafd4a3..3e2ff899f83b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ modules/openapi-generator-gradle-plugin/bin/ .classpath lib/* build/* +.kotlin generated-files/* generated-sources/* generated-code/* diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 048e22bf28a8..315172c8fef0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -642,7 +642,7 @@ private void processKotlinxDate() { typeMapping.put("Date", "LocalDate"); typeMapping.put("Time", "LocalTime"); - importMapping.put("Instant", "kotlinx.datetime.Instant"); + importMapping.put("Instant", "kotlin.time.Instant"); importMapping.put("LocalDate", "kotlinx.datetime.LocalDate"); importMapping.put("LocalTime", "kotlinx.datetime.LocalTime"); } @@ -887,7 +887,6 @@ private void processMultiplatformLibrary(final String infrastructureFolder) { // multiplatform specific supporting files supportingFiles.add(new SupportingFile("infrastructure/Base64ByteArray.kt.mustache", infrastructureFolder, "Base64ByteArray.kt")); - supportingFiles.add(new SupportingFile("infrastructure/Bytes.kt.mustache", infrastructureFolder, "Bytes.kt")); supportingFiles.add(new SupportingFile("infrastructure/HttpResponse.kt.mustache", infrastructureFolder, "HttpResponse.kt")); supportingFiles.add(new SupportingFile("infrastructure/OctetByteArray.kt.mustache", infrastructureFolder, "OctetByteArray.kt")); diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache index 5d4f0e1cdf81..7af930c64ada 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache @@ -21,11 +21,11 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requires {{#jvm}} -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 {{/jvm}} {{#multiplatform}} -* Kotlin 1.5.10 +* Kotlin 2.2.20 {{/multiplatform}} ## Build diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 9f2719ce9da0..b2405c950c1c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -3,34 +3,34 @@ version '{{artifactVersion}}' {{^omitGradleWrapper}} wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } {{/omitGradleWrapper}} buildscript { - ext.kotlin_version = '1.9.23' + ext.kotlin_version = '2.2.20' {{#jvm-ktor}} - ext.ktor_version = '2.3.9' + ext.ktor_version = '3.2.3' {{/jvm-ktor}} {{#jvm-retrofit2}} - ext.retrofitVersion = '2.10.0' + ext.retrofitVersion = '3.0.0' {{/jvm-retrofit2}} {{#useRxJava3}} - ext.rxJava3Version = '3.1.8' + ext.rxJava3Version = '3.1.11' {{/useRxJava3}} {{#jvm-vertx}} - ext.vertx_version = "4.5.6" + ext.vertx_version = "5.0.4" {{/jvm-vertx}} {{#jvm-spring}} {{#useSpringBoot3}} - ext.spring_boot_version = "3.2.5" + ext.spring_boot_version = "3.5.5" {{/useSpringBoot3}} {{^useSpringBoot3}} ext.spring_boot_version = "2.7.18" {{/useSpringBoot3}} {{/jvm-spring}} - ext.spotless_version = "6.25.0" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -41,12 +41,15 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" {{/kotlinx_serialization}} classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version" + {{#moshiCodeGen}} + classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.2.20-2.0.3" + {{/moshiCodeGen}} } } apply plugin: 'kotlin' {{#moshiCodeGen}} -apply plugin: 'kotlin-kapt' +apply plugin: 'com.google.devtools.ksp' {{/moshiCodeGen}} {{#parcelizeModels}} apply plugin: 'kotlin-parcelize' @@ -118,35 +121,46 @@ kotlin { } } {{/jvm-spring-restclient}} +{{#kotlinx-datetime}} +kotlin { + sourceSets { + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } + } +} +{{/kotlinx-datetime}} dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" {{^doNotUseRxAndCoroutines}} {{#useCoroutines}} - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2" {{/useCoroutines}} {{/doNotUseRxAndCoroutines}} {{#moshi}} {{^moshiCodeGen}} implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" {{/moshiCodeGen}} {{#moshiCodeGen}} - implementation "com.squareup.moshi:moshi:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - kapt "com.squareup.moshi:moshi-kotlin-codegen:1.15.1" + implementation "com.squareup.moshi:moshi:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.2" {{/moshiCodeGen}} {{/moshi}} {{#gson}} - implementation "com.google.code.gson:gson:2.10.1" + implementation "com.google.code.gson:gson:2.13.2" {{/gson}} {{#jackson}} implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" {{/jackson}} {{#kotlinx_serialization}} - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" {{/kotlinx_serialization}} {{#jvm-ktor}} implementation "io.ktor:ktor-client-core:$ktor_version" @@ -161,29 +175,29 @@ dependencies { {{/jackson}} {{/jvm-ktor}} {{#jvm-okhttp4}} - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.okhttp3:okhttp:5.1.0" {{/jvm-okhttp4}} {{#jvm-spring-webclient}} implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" - implementation "io.projectreactor:reactor-core:3.6.5" + implementation "io.projectreactor:reactor-core:3.7.11" {{/jvm-spring-webclient}} {{#jvm-spring-restclient}} implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version" {{/jvm-spring-restclient}} {{#threetenbp}} - implementation "org.threeten:threetenbp:1.6.8" + implementation "org.threeten:threetenbp:1.7.2" {{/threetenbp}} {{#kotlinx-datetime}} - implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.5.0" + implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.7.1" {{/kotlinx-datetime}} {{#jvm-retrofit2}} {{#hasOAuthMethods}} implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" {{/hasOAuthMethods}} - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" {{#useRxJava3}} implementation "io.reactivex.rxjava3:rxjava:$rxJava3Version" - implementation "com.squareup.retrofit2:adapter-rxjava3:2.10.0" + implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion" {{/useRxJava3}} implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" {{#gson}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.jar b/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.jar and b/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.jar differ diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.properties.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.properties.mustache index 6eb2a6bb7b23..0cd4baa77c51 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.properties.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/gradle-wrapper.properties.mustache @@ -4,7 +4,7 @@ distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip {{/jvm-volley}} {{^jvm-volley}} -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip {{/jvm-volley}} networkTimeout=10000 validateDistributionUrl=true diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.bat.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.bat.mustache index 107acd32c4e6..9d21a21834d5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.bat.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.bat.mustache @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.mustache index 9d0ce634cb11..51eb8bb47109 100755 --- a/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/gradlew.mustache @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/InstantAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/InstantAdapter.kt.mustache index d2b8d4b5dd58..45b86b59f43a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/InstantAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/InstantAdapter.kt.mustache @@ -11,7 +11,7 @@ import com.google.gson.stream.JsonWriter import com.google.gson.stream.JsonToken.NULL import java.io.IOException {{/gson}} -import kotlinx.datetime.Instant +import kotlin.time.Instant {{#moshi}} {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class InstantAdapter { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache index 7ba381ea5495..f27aa725a486 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache @@ -23,7 +23,8 @@ import org.threeten.bp.LocalDateTime import org.threeten.bp.OffsetDateTime {{/threetenbp}} {{#kotlinx-datetime}} -import kotlinx.datetime.Instant +import kotlin.time.Instant +import kotlinx.datetime.LocalDate import kotlinx.datetime.LocalTime {{/kotlinx-datetime}} import java.util.UUID @@ -67,6 +68,7 @@ import java.util.concurrent.atomic.AtomicLong .add(OffsetDateTimeAdapter()) {{#kotlinx-datetime}} .add(InstantAdapter()) + .add(LocalDateAdapter()) .add(LocalTimeAdapter()) {{/kotlinx-datetime}} .add(LocalDateTimeAdapter()) @@ -94,6 +96,7 @@ import java.util.concurrent.atomic.AtomicLong .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) {{#kotlinx-datetime}} .registerTypeAdapter(Instant::class.java, InstantAdapter()) + .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) .registerTypeAdapter(LocalTime::class.java, LocalTimeAdapter()) {{/kotlinx-datetime}} .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache index ceb094109c5f..9289029838fb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-vertx/api.mustache @@ -27,7 +27,7 @@ import io.vertx.ext.web.client.WebClient import io.vertx.uritemplate.UriTemplate {{#useCoroutines}} -import io.vertx.kotlin.coroutines.await +import io.vertx.kotlin.coroutines.coAwait import io.vertx.kotlin.coroutines.dispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -119,7 +119,7 @@ import {{packageName}}.infrastructure.* throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }{{#useCoroutines}}.await(){{/useCoroutines}} + }{{#useCoroutines}}.coAwait(){{/useCoroutines}} } /** diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache index de188e8dace9..9626ffa9babe 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}} - kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}} + kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.2.20" // kotlin_version{{/omitGradlePluginVersions}} + kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.2.20" // kotlin_version{{/omitGradlePluginVersions}} } group = "{{groupId}}" version = "{{artifactVersion}}" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -43,7 +43,7 @@ kotlin { api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") {{#kotlinx-datetime}} - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") {{/kotlinx-datetime}} } } @@ -79,21 +79,25 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + {{#kotlinx-datetime}} + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } + {{/kotlinx-datetime}} } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache index 8d66ef5b0d2a..bb5cbec8ab47 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Base64ByteArray.kt.mustache @@ -3,13 +3,14 @@ package {{packageName}}.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class Base64ByteArray({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: ByteArray) { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ import kotlinx.serialization.encoding.* } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache deleted file mode 100644 index c5ee141023b2..000000000000 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache +++ /dev/null @@ -1,104 +0,0 @@ -package {{packageName}}.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache index c917e0f398ca..9da75f4945da 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/OctetByteArray.kt.mustache @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class OctetByteArray({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: ByteArray) { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ import kotlinx.serialization.encoding.* } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/README.md b/samples/client/echo_api/kotlin-jvm-okhttp/README.md index 8766748e9dbc..01448588b20f 100644 --- a/samples/client/echo_api/kotlin-jvm-okhttp/README.md +++ b/samples/client/echo_api/kotlin-jvm-okhttp/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/build.gradle b/samples/client/echo_api/kotlin-jvm-okhttp/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/echo_api/kotlin-jvm-okhttp/build.gradle +++ b/samples/client/echo_api/kotlin-jvm-okhttp/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.jar and b/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/echo_api/kotlin-jvm-okhttp/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/gradlew b/samples/client/echo_api/kotlin-jvm-okhttp/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/echo_api/kotlin-jvm-okhttp/gradlew +++ b/samples/client/echo_api/kotlin-jvm-okhttp/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/gradlew.bat b/samples/client/echo_api/kotlin-jvm-okhttp/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/echo_api/kotlin-jvm-okhttp/gradlew.bat +++ b/samples/client/echo_api/kotlin-jvm-okhttp/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/echo_api/kotlin-jvm-okhttp/src/test/kotlin/org/openapitools/client/CustomTests.kt b/samples/client/echo_api/kotlin-jvm-okhttp/src/test/kotlin/org/openapitools/client/CustomTests.kt index 1ae81bf93b71..60860c079ef3 100644 --- a/samples/client/echo_api/kotlin-jvm-okhttp/src/test/kotlin/org/openapitools/client/CustomTests.kt +++ b/samples/client/echo_api/kotlin-jvm-okhttp/src/test/kotlin/org/openapitools/client/CustomTests.kt @@ -16,7 +16,6 @@ class CustomTests : ShouldSpec({ parsedResult.body shouldContain """ Content-Disposition: form-data; name="my-file" - Content-Length: 0 """.trimIndent() } @@ -27,8 +26,7 @@ class CustomTests : ShouldSpec({ parsedResult.body shouldContain """ Content-Disposition: form-data; name="my-file"; filename="test.txt" Content-Type: text/plain - Content-Length: 12 - + testing only """.trimIndent() } @@ -40,15 +38,13 @@ class CustomTests : ShouldSpec({ parsedResult.body shouldContain """ Content-Disposition: form-data; name="files"; filename="test.txt" Content-Type: text/plain - Content-Length: 12 - + testing only """.trimIndent() parsedResult.body shouldContain """ Content-Disposition: form-data; name="files"; filename="otherTestFile.txt" Content-Type: text/plain - Content-Length: 17 Another test file """.trimIndent() diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/README.md b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/README.md index 3f54f064b9a2..46dfb34b87ff 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/README.md +++ b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/build.gradle b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/build.gradle index c25d660f6747..dde9b1789935 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/build.gradle +++ b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spring_boot_version = "3.2.5" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spring_boot_version = "3.5.5" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -61,8 +61,8 @@ kotlin { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar and b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew +++ b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew.bat b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew.bat +++ b/samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/README.md b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/README.md index 3f54f064b9a2..46dfb34b87ff 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/README.md +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/build.gradle b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/build.gradle index 786c00c321d4..a43cda96a103 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/build.gradle +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spring_boot_version = "3.2.5" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spring_boot_version = "3.5.5" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -62,9 +62,9 @@ kotlin { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" - implementation "io.projectreactor:reactor-core:3.6.5" + implementation "io.projectreactor:reactor-core:3.7.11" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar and b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew.bat b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew.bat +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/echo_api/kotlin-model-prefix-type-mappings/README.md b/samples/client/echo_api/kotlin-model-prefix-type-mappings/README.md index 7f842c7a575b..a844f3923eff 100644 --- a/samples/client/echo_api/kotlin-model-prefix-type-mappings/README.md +++ b/samples/client/echo_api/kotlin-model-prefix-type-mappings/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/echo_api/kotlin-model-prefix-type-mappings/build.gradle b/samples/client/echo_api/kotlin-model-prefix-type-mappings/build.gradle index 327c406db3c0..a95a10d88644 100644 --- a/samples/client/echo_api/kotlin-model-prefix-type-mappings/build.gradle +++ b/samples/client/echo_api/kotlin-model-prefix-type-mappings/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,9 +55,9 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" - implementation "com.google.code.gson:gson:2.10.1" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2" + implementation "com.google.code.gson:gson:2.13.2" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar and b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew +++ b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew.bat b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew.bat +++ b/samples/client/echo_api/kotlin-model-prefix-type-mappings/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/others/kotlin-integer-enum/README.md b/samples/client/others/kotlin-integer-enum/README.md index e1c5c5d4ef36..9ae266149c33 100644 --- a/samples/client/others/kotlin-integer-enum/README.md +++ b/samples/client/others/kotlin-integer-enum/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/others/kotlin-integer-enum/build.gradle b/samples/client/others/kotlin-integer-enum/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/others/kotlin-integer-enum/build.gradle +++ b/samples/client/others/kotlin-integer-enum/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.jar b/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.jar and b/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.properties b/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/others/kotlin-integer-enum/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/others/kotlin-integer-enum/gradlew b/samples/client/others/kotlin-integer-enum/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/others/kotlin-integer-enum/gradlew +++ b/samples/client/others/kotlin-integer-enum/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/others/kotlin-integer-enum/gradlew.bat b/samples/client/others/kotlin-integer-enum/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/others/kotlin-integer-enum/gradlew.bat +++ b/samples/client/others/kotlin-integer-enum/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/README.md b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/README.md +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/build.gradle b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/build.gradle +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.jar b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.jar and b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.properties b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew.bat b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew.bat +++ b/samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/README.md b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/README.md index 23a95cc07383..2ce2ee4c0939 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/README.md +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/build.gradle b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/build.gradle +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.jar b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.jar and b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.properties b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew.bat b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew.bat +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/others/kotlin-jvm-okhttp-path-comments/README.md b/samples/client/others/kotlin-jvm-okhttp-path-comments/README.md index e2c155235590..8bd2f1ff95c9 100644 --- a/samples/client/others/kotlin-jvm-okhttp-path-comments/README.md +++ b/samples/client/others/kotlin-jvm-okhttp-path-comments/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/others/kotlin-jvm-okhttp-path-comments/build.gradle b/samples/client/others/kotlin-jvm-okhttp-path-comments/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-path-comments/build.gradle +++ b/samples/client/others/kotlin-jvm-okhttp-path-comments/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.jar b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.jar and b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.properties b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew +++ b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew.bat b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew.bat +++ b/samples/client/others/kotlin-jvm-okhttp-path-comments/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/README.md b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/README.md index fd5fb5c7e9b3..38139e228040 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/README.md +++ b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/README.md @@ -13,8 +13,8 @@ For more information, please visit [https://example.org](https://example.org) ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/build.gradle b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/build.gradle index 4f06acff349e..d6568983d230 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/build.gradle +++ b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,8 +56,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew +++ b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew.bat b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew.bat +++ b/samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-allOf-discriminator/README.md b/samples/client/petstore/kotlin-allOf-discriminator/README.md index fd5fb5c7e9b3..38139e228040 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator/README.md +++ b/samples/client/petstore/kotlin-allOf-discriminator/README.md @@ -13,8 +13,8 @@ For more information, please visit [https://example.org](https://example.org) ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-allOf-discriminator/build.gradle b/samples/client/petstore/kotlin-allOf-discriminator/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator/build.gradle +++ b/samples/client/petstore/kotlin-allOf-discriminator/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-allOf-discriminator/gradlew b/samples/client/petstore/kotlin-allOf-discriminator/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-allOf-discriminator/gradlew +++ b/samples/client/petstore/kotlin-allOf-discriminator/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-allOf-discriminator/gradlew.bat b/samples/client/petstore/kotlin-allOf-discriminator/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-allOf-discriminator/gradlew.bat +++ b/samples/client/petstore/kotlin-allOf-discriminator/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md index 219d9c45cd77..6074de483766 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew.bat b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew.bat +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew.bat b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew.bat +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES index 969f423e8937..585a7d492e82 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES @@ -15,7 +15,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt -src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/README.md b/samples/client/petstore/kotlin-array-simple-string-multiplatform/README.md index 7001d6daf652..68ea3ceaea91 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/README.md @@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.5.10 +* Kotlin 2.2.20 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts index c18e8595dfca..c545c8032baf 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "2.1.21" // kotlin_version - kotlin("plugin.serialization") version "2.1.21" // kotlin_version + kotlin("multiplatform") version "2.2.20" // kotlin_version + kotlin("plugin.serialization") version "2.2.20" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -38,7 +38,7 @@ kotlin { api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") } } @@ -73,21 +73,23 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew.bat b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew.bat +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt index 743d6650085d..0fda8e759f0c 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) class Base64ByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) { } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index fe511d948125..000000000000 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt index 215042551235..5c4b29cd595f 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* class OctetByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) { } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index af8caa633ccb..000000000000 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,100 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readBytes() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun ByteReadPacket.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES index bd3e98e76508..d711330cee6f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES @@ -16,7 +16,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt -src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/README.md b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/README.md index 367477ea3bf2..0daee86d9dff 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/README.md +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/README.md @@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.5.10 +* Kotlin 2.2.20 ## Build diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts index c18e8595dfca..c545c8032baf 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "2.1.21" // kotlin_version - kotlin("plugin.serialization") version "2.1.21" // kotlin_version + kotlin("multiplatform") version "2.2.20" // kotlin_version + kotlin("plugin.serialization") version "2.2.20" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -38,7 +38,7 @@ kotlin { api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") } } @@ -73,21 +73,23 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew.bat b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew.bat +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt index 743d6650085d..0fda8e759f0c 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) class Base64ByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) { } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index fe511d948125..000000000000 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt index 215042551235..5c4b29cd595f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* class OctetByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) { } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index af8caa633ccb..000000000000 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,100 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readBytes() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun ByteReadPacket.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md index c89541c857d2..c978b37d7ae5 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew.bat b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew.bat +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md index d17056655f12..a4a86fbcba0f 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew.bat b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew.bat +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md index 6f15d23f615f..a53601b6736e 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle index 94c16d7910e4..ea01ca8af04f 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,9 +56,9 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew.bat b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew.bat +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-default-values-jvm-volley/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-default-values-jvm-volley/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-default-values-jvm-volley/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-default-values-jvm-volley/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew b/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew +++ b/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew.bat b/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew.bat +++ b/samples/client/petstore/kotlin-default-values-jvm-volley/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES index bd3e98e76508..d711330cee6f 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES @@ -16,7 +16,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt -src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/README.md b/samples/client/petstore/kotlin-default-values-multiplatform/README.md index 61bf17a92135..f8fd8abc7708 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/README.md +++ b/samples/client/petstore/kotlin-default-values-multiplatform/README.md @@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.5.10 +* Kotlin 2.2.20 ## Build diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts index c18e8595dfca..c545c8032baf 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "2.1.21" // kotlin_version - kotlin("plugin.serialization") version "2.1.21" // kotlin_version + kotlin("multiplatform") version "2.2.20" // kotlin_version + kotlin("plugin.serialization") version "2.2.20" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -38,7 +38,7 @@ kotlin { api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") } } @@ -73,21 +73,23 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-default-values-multiplatform/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/gradlew b/samples/client/petstore/kotlin-default-values-multiplatform/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-default-values-multiplatform/gradlew +++ b/samples/client/petstore/kotlin-default-values-multiplatform/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/gradlew.bat b/samples/client/petstore/kotlin-default-values-multiplatform/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/gradlew.bat +++ b/samples/client/petstore/kotlin-default-values-multiplatform/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt index 743d6650085d..0fda8e759f0c 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt +++ b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) class Base64ByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) { } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index fe511d948125..000000000000 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt index 215042551235..5c4b29cd595f 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +++ b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* class OctetByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) { } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index af8caa633ccb..000000000000 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,100 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readBytes() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun ByteReadPacket.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-enum-default-value/README.md b/samples/client/petstore/kotlin-enum-default-value/README.md index f3cfa542a32d..20e9ed630d10 100644 --- a/samples/client/petstore/kotlin-enum-default-value/README.md +++ b/samples/client/petstore/kotlin-enum-default-value/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-enum-default-value/build.gradle b/samples/client/petstore/kotlin-enum-default-value/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-enum-default-value/build.gradle +++ b/samples/client/petstore/kotlin-enum-default-value/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-enum-default-value/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-enum-default-value/gradlew b/samples/client/petstore/kotlin-enum-default-value/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-enum-default-value/gradlew +++ b/samples/client/petstore/kotlin-enum-default-value/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-enum-default-value/gradlew.bat b/samples/client/petstore/kotlin-enum-default-value/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-enum-default-value/gradlew.bat +++ b/samples/client/petstore/kotlin-enum-default-value/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-explicit/README.md b/samples/client/petstore/kotlin-explicit/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-explicit/README.md +++ b/samples/client/petstore/kotlin-explicit/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-explicit/build.gradle b/samples/client/petstore/kotlin-explicit/build.gradle index 68e19876d31a..559604d7fc98 100644 --- a/samples/client/petstore/kotlin-explicit/build.gradle +++ b/samples/client/petstore/kotlin-explicit/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -58,8 +58,8 @@ kotlin { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-explicit/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-explicit/gradlew b/samples/client/petstore/kotlin-explicit/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-explicit/gradlew +++ b/samples/client/petstore/kotlin-explicit/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-explicit/gradlew.bat b/samples/client/petstore/kotlin-explicit/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-explicit/gradlew.bat +++ b/samples/client/petstore/kotlin-explicit/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-gson/README.md b/samples/client/petstore/kotlin-gson/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-gson/README.md +++ b/samples/client/petstore/kotlin-gson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-gson/build.gradle b/samples/client/petstore/kotlin-gson/build.gradle index ed4098e13738..58f0e6fe9a98 100644 --- a/samples/client/petstore/kotlin-gson/build.gradle +++ b/samples/client/petstore/kotlin-gson/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -54,7 +54,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "com.google.code.gson:gson:2.10.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.google.code.gson:gson:2.13.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-gson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-gson/gradlew b/samples/client/petstore/kotlin-gson/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-gson/gradlew +++ b/samples/client/petstore/kotlin-gson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-gson/gradlew.bat b/samples/client/petstore/kotlin-gson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-gson/gradlew.bat +++ b/samples/client/petstore/kotlin-gson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jackson/README.md b/samples/client/petstore/kotlin-jackson/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jackson/README.md +++ b/samples/client/petstore/kotlin-jackson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jackson/build.gradle b/samples/client/petstore/kotlin-jackson/build.gradle index 9f3571076766..efcc639276cc 100644 --- a/samples/client/petstore/kotlin-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jackson/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jackson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jackson/gradlew b/samples/client/petstore/kotlin-jackson/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-jackson/gradlew +++ b/samples/client/petstore/kotlin-jackson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jackson/gradlew.bat b/samples/client/petstore/kotlin-jackson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jackson/gradlew.bat +++ b/samples/client/petstore/kotlin-jackson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-json-request-string/README.md b/samples/client/petstore/kotlin-json-request-string/README.md index 43fe468eb014..6c6ad13fc7ef 100644 --- a/samples/client/petstore/kotlin-json-request-string/README.md +++ b/samples/client/petstore/kotlin-json-request-string/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-json-request-string/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle index 821fd5bfdc34..34cd5ecbf48c 100644 --- a/samples/client/petstore/kotlin-json-request-string/build.gradle +++ b/samples/client/petstore/kotlin-json-request-string/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -57,8 +57,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-json-request-string/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-json-request-string/gradlew b/samples/client/petstore/kotlin-json-request-string/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-json-request-string/gradlew +++ b/samples/client/petstore/kotlin-json-request-string/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-json-request-string/gradlew.bat b/samples/client/petstore/kotlin-json-request-string/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-json-request-string/gradlew.bat +++ b/samples/client/petstore/kotlin-json-request-string/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-jackson/README.md b/samples/client/petstore/kotlin-jvm-jackson/README.md index 74fcacdd3a56..f82396251845 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/README.md +++ b/samples/client/petstore/kotlin-jvm-jackson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-jackson/build.gradle b/samples/client/petstore/kotlin-jvm-jackson/build.gradle index d086a66db951..d2382a838b65 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-jackson/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,10 +56,10 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-jackson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-jackson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-jackson/gradlew b/samples/client/petstore/kotlin-jvm-jackson/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/gradlew +++ b/samples/client/petstore/kotlin-jvm-jackson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-jackson/gradlew.bat b/samples/client/petstore/kotlin-jvm-jackson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-jackson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/README.md b/samples/client/petstore/kotlin-jvm-ktor-gson/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle index 21819e84790c..0e33b759e883 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.ktor_version = '2.3.9' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.ktor_version = '3.2.3' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,7 +55,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "com.google.code.gson:gson:2.10.1" + implementation "com.google.code.gson:gson:2.13.2" implementation "io.ktor:ktor-client-core:$ktor_version" implementation "io.ktor:ktor-client-content-negotiation:$ktor_version" implementation "io.ktor:ktor-serialization-gson:$ktor_version" diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew b/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew.bat b/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle index c308a9bc68f8..52ff20b1682d 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.ktor_version = '2.3.9' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.ktor_version = '3.2.3' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,8 +56,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "io.ktor:ktor-client-core:$ktor_version" implementation "io.ktor:ktor-client-content-negotiation:$ktor_version" implementation "io.ktor:ktor-client-jackson:$ktor_version" diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew.bat b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/README.md b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/build.gradle index 126b859fb7b1..66d2f597db73 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.ktor_version = '2.3.9' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.ktor_version = '3.2.3' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -57,7 +57,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" implementation "io.ktor:ktor-client-core:$ktor_version" implementation "io.ktor:ktor-client-content-negotiation:$ktor_version" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew.bat b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle index 05954224125f..2170c4b70eab 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -54,8 +54,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" - implementation "com.google.code.gson:gson:2.10.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2" + implementation "com.google.code.gson:gson:2.13.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew.bat b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md index 74fcacdd3a56..f82396251845 100644 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle index 52b6635987da..dace8d64ea27 100644 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,10 +55,10 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" - implementation "com.google.code.gson:gson:2.10.1" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2" + implementation "com.google.code.gson:gson:2.13.2" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew.bat b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-retrofit2-coroutines/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/README.md b/samples/client/petstore/kotlin-jvm-spring-2-webclient/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/README.md +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/build.gradle b/samples/client/petstore/kotlin-jvm-spring-2-webclient/build.gradle index 3bfc090978f0..57c605fbe5ff 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/build.gradle +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' + ext.kotlin_version = '2.2.20' ext.spring_boot_version = "2.7.18" - ext.spotless_version = "6.25.0" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,9 +56,9 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" - implementation "io.projectreactor:reactor-core:3.6.5" + implementation "io.projectreactor:reactor-core:3.7.11" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew.bat b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/README.md b/samples/client/petstore/kotlin-jvm-spring-3-restclient/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/README.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/build.gradle b/samples/client/petstore/kotlin-jvm-spring-3-restclient/build.gradle index c25d660f6747..dde9b1789935 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/build.gradle +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spring_boot_version = "3.2.5" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spring_boot_version = "3.5.5" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -61,8 +61,8 @@ kotlin { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew.bat b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-spring-3-restclient/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/README.md b/samples/client/petstore/kotlin-jvm-spring-3-webclient/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/README.md +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/build.gradle b/samples/client/petstore/kotlin-jvm-spring-3-webclient/build.gradle index 786c00c321d4..a43cda96a103 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/build.gradle +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spring_boot_version = "3.2.5" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spring_boot_version = "3.5.5" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -62,9 +62,9 @@ kotlin { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" - implementation "io.projectreactor:reactor-core:3.6.5" + implementation "io.projectreactor:reactor-core:3.7.11" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew.bat b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/README.md b/samples/client/petstore/kotlin-jvm-vertx-gson/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle index b905eef5d547..76e9949973f9 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.vertx_version = "4.5.6" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.vertx_version = "5.0.4" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,7 +55,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "com.google.code.gson:gson:2.10.1" + implementation "com.google.code.gson:gson:2.13.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" implementation "io.vertx:vertx-web-client:$vertx_version" implementation "io.vertx:vertx-core:$vertx_version" diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew b/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew.bat b/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle index 30f78ef11142..ee735c235956 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.vertx_version = "4.5.6" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.vertx_version = "5.0.4" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,10 +55,10 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" implementation "io.vertx:vertx-web-client:$vertx_version" implementation "io.vertx:vertx-core:$vertx_version" diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew.bat b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 8ed11f7539aa..c1580b81ef9e 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -31,7 +31,7 @@ import io.vertx.core.Future import io.vertx.ext.web.client.WebClient import io.vertx.uritemplate.UriTemplate -import io.vertx.kotlin.coroutines.await +import io.vertx.kotlin.coroutines.coAwait import io.vertx.kotlin.coroutines.dispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -69,7 +69,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -138,7 +138,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -213,7 +213,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -281,7 +281,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -349,7 +349,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -419,7 +419,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -489,7 +489,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -561,7 +561,7 @@ class PetApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: S throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 54f9dc5f072b..767aa9f9c571 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -30,7 +30,7 @@ import io.vertx.core.Future import io.vertx.ext.web.client.WebClient import io.vertx.uritemplate.UriTemplate -import io.vertx.kotlin.coroutines.await +import io.vertx.kotlin.coroutines.coAwait import io.vertx.kotlin.coroutines.dispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -67,7 +67,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -128,7 +128,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -197,7 +197,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -260,7 +260,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 2defd6065920..40d129b15043 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -30,7 +30,7 @@ import io.vertx.core.Future import io.vertx.ext.web.client.WebClient import io.vertx.uritemplate.UriTemplate -import io.vertx.kotlin.coroutines.await +import io.vertx.kotlin.coroutines.coAwait import io.vertx.kotlin.coroutines.dispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -67,7 +67,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -137,7 +137,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -207,7 +207,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -277,7 +277,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -346,7 +346,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -410,7 +410,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -474,7 +474,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** @@ -542,7 +542,7 @@ class UserApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) } } - }.await() + }.coAwait() } /** diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle index 105b4d040703..68992293d8a3 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.vertx_version = "4.5.6" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.vertx_version = "5.0.4" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,8 +56,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" implementation "io.vertx:vertx-web-client:$vertx_version" implementation "io.vertx:vertx-core:$vertx_version" diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew.bat b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle index 86537ceecdf7..c0289727d077 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.vertx_version = "4.5.6" - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.vertx_version = "5.0.4" + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,8 +56,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" implementation "io.vertx:vertx-web-client:$vertx_version" implementation "io.vertx:vertx-core:$vertx_version" diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew.bat b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-jvm-volley/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-jvm-volley/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-jvm-volley/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-jvm-volley/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-jvm-volley/gradlew b/samples/client/petstore/kotlin-jvm-volley/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-jvm-volley/gradlew +++ b/samples/client/petstore/kotlin-jvm-volley/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-jvm-volley/gradlew.bat b/samples/client/petstore/kotlin-jvm-volley/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-jvm-volley/gradlew.bat +++ b/samples/client/petstore/kotlin-jvm-volley/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/README.md b/samples/client/petstore/kotlin-kotlinx-datetime/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/README.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/build.gradle b/samples/client/petstore/kotlin-kotlinx-datetime/build.gradle index 361efdaa3b90..df43b8ff4ba5 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/build.gradle +++ b/samples/client/petstore/kotlin-kotlinx-datetime/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -52,12 +52,21 @@ test { useJUnitPlatform() } +kotlin { + sourceSets { + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } + } +} dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" - implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.5.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" + implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.7.1" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md b/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md index 6764fc5308dd..bc768aa93288 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md +++ b/samples/client/petstore/kotlin-kotlinx-datetime/docs/Order.md @@ -7,7 +7,7 @@ | **id** | **kotlin.Long** | | [optional] | | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | -| **shipDate** | [**kotlinx.datetime.Instant**](kotlinx.datetime.Instant.md) | | [optional] | +| **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/gradlew b/samples/client/petstore/kotlin-kotlinx-datetime/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-kotlinx-datetime/gradlew +++ b/samples/client/petstore/kotlin-kotlinx-datetime/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/gradlew.bat b/samples/client/petstore/kotlin-kotlinx-datetime/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/gradlew.bat +++ b/samples/client/petstore/kotlin-kotlinx-datetime/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/InstantAdapter.kt b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/InstantAdapter.kt index 0e155923ee82..7bc4e2eec4e9 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/InstantAdapter.kt +++ b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/InstantAdapter.kt @@ -2,7 +2,7 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.FromJson import com.squareup.moshi.ToJson -import kotlinx.datetime.Instant +import kotlin.time.Instant class InstantAdapter { @ToJson diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 2e8f453125ba..3b8e3bde6b3b 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -8,6 +8,7 @@ object Serializer { val moshiBuilder: Moshi.Builder = Moshi.Builder() .add(OffsetDateTimeAdapter()) .add(InstantAdapter()) + .add(LocalDateAdapter()) .add(LocalTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt index 17e3942b9e65..59ae8ec40e05 100644 --- a/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -43,7 +43,7 @@ data class Order ( val quantity: kotlin.Int? = null, @Json(name = "shipDate") - val shipDate: kotlinx.datetime.Instant? = null, + val shipDate: kotlin.time.Instant? = null, /* Order Status */ @Json(name = "status") diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/README.md b/samples/client/petstore/kotlin-model-prefix-type-mappings/README.md index a39d9c63afbe..cb4c58ba3b0a 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/README.md +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/build.gradle b/samples/client/petstore/kotlin-model-prefix-type-mappings/build.gradle index 52b6635987da..dace8d64ea27 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/build.gradle +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,10 +55,10 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" - implementation "com.google.code.gson:gson:2.10.1" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2" + implementation "com.google.code.gson:gson:2.13.2" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew.bat b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew.bat +++ b/samples/client/petstore/kotlin-model-prefix-type-mappings/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-modelMutable/README.md b/samples/client/petstore/kotlin-modelMutable/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-modelMutable/README.md +++ b/samples/client/petstore/kotlin-modelMutable/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-modelMutable/build.gradle b/samples/client/petstore/kotlin-modelMutable/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-modelMutable/build.gradle +++ b/samples/client/petstore/kotlin-modelMutable/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-modelMutable/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-modelMutable/gradlew b/samples/client/petstore/kotlin-modelMutable/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-modelMutable/gradlew +++ b/samples/client/petstore/kotlin-modelMutable/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-modelMutable/gradlew.bat b/samples/client/petstore/kotlin-modelMutable/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-modelMutable/gradlew.bat +++ b/samples/client/petstore/kotlin-modelMutable/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-moshi-codegen/README.md b/samples/client/petstore/kotlin-moshi-codegen/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/README.md +++ b/samples/client/petstore/kotlin-moshi-codegen/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-moshi-codegen/build.gradle b/samples/client/petstore/kotlin-moshi-codegen/build.gradle index 4a0aa606cdd1..06078e9541d3 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/build.gradle +++ b/samples/client/petstore/kotlin-moshi-codegen/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -16,11 +16,12 @@ buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version" + classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.2.20-2.0.3" } } apply plugin: 'kotlin' -apply plugin: 'kotlin-kapt' +apply plugin: 'com.google.devtools.ksp' apply plugin: 'maven-publish' apply plugin: 'com.diffplug.spotless' @@ -55,9 +56,9 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "com.squareup.moshi:moshi:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - kapt "com.squareup.moshi:moshi-kotlin-codegen:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-moshi-codegen/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-moshi-codegen/gradlew b/samples/client/petstore/kotlin-moshi-codegen/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-moshi-codegen/gradlew +++ b/samples/client/petstore/kotlin-moshi-codegen/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-moshi-codegen/gradlew.bat b/samples/client/petstore/kotlin-moshi-codegen/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/gradlew.bat +++ b/samples/client/petstore/kotlin-moshi-codegen/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/.openapi-generator/FILES b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/.openapi-generator/FILES index 57bfaf09731f..9c1a908240d1 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/.openapi-generator/FILES @@ -17,7 +17,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt -src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/README.md b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/README.md index 9dcb189fd3e0..51a0f368e8de 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/README.md +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/README.md @@ -13,7 +13,7 @@ For more information, please visit [https://example.org](https://example.org) ## Requires -* Kotlin 1.5.10 +* Kotlin 2.2.20 ## Build diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/build.gradle.kts b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/build.gradle.kts index c18e8595dfca..c545c8032baf 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/build.gradle.kts +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "2.1.21" // kotlin_version - kotlin("plugin.serialization") version "2.1.21" // kotlin_version + kotlin("multiplatform") version "2.2.20" // kotlin_version + kotlin("plugin.serialization") version "2.2.20" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -38,7 +38,7 @@ kotlin { api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") } } @@ -73,21 +73,23 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew.bat b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew.bat +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt index 743d6650085d..0fda8e759f0c 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) class Base64ByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) { } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index fe511d948125..000000000000 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt index 215042551235..5c4b29cd595f 100644 --- a/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +++ b/samples/client/petstore/kotlin-multiplatform-allOf-discriminator/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* class OctetByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) { } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES index 54e8e5763da6..43312ee7b338 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES @@ -25,7 +25,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt -src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/README.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/README.md index f62e59b0dbab..b8f7ae14eae0 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/README.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/README.md @@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.5.10 +* Kotlin 2.2.20 ## Build diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts index c18e8595dfca..c545c8032baf 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "2.1.21" // kotlin_version - kotlin("plugin.serialization") version "2.1.21" // kotlin_version + kotlin("multiplatform") version "2.2.20" // kotlin_version + kotlin("plugin.serialization") version "2.2.20" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -38,7 +38,7 @@ kotlin { api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") } } @@ -73,21 +73,23 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md index 6764fc5308dd..bc768aa93288 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/docs/Order.md @@ -7,7 +7,7 @@ | **id** | **kotlin.Long** | | [optional] | | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | -| **shipDate** | [**kotlinx.datetime.Instant**](kotlinx.datetime.Instant.md) | | [optional] | +| **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew.bat b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew.bat +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt index 743d6650085d..0fda8e759f0c 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) class Base64ByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) { } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index fe511d948125..000000000000 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt index 215042551235..5c4b29cd595f 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* class OctetByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) { } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index e763dafa5395..1ca87937d44c 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -40,7 +40,7 @@ data class Order ( @SerialName(value = "quantity") val quantity: kotlin.Int? = null, - @SerialName(value = "shipDate") val shipDate: kotlinx.datetime.Instant? = null, + @SerialName(value = "shipDate") val shipDate: kotlin.time.Instant? = null, /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES index 6468fd041167..366355a6a677 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES @@ -21,7 +21,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt -src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/samples/client/petstore/kotlin-multiplatform/README.md b/samples/client/petstore/kotlin-multiplatform/README.md index f62e59b0dbab..b8f7ae14eae0 100644 --- a/samples/client/petstore/kotlin-multiplatform/README.md +++ b/samples/client/petstore/kotlin-multiplatform/README.md @@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.5.10 +* Kotlin 2.2.20 ## Build diff --git a/samples/client/petstore/kotlin-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-multiplatform/build.gradle.kts index c18e8595dfca..c545c8032baf 100644 --- a/samples/client/petstore/kotlin-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "2.1.21" // kotlin_version - kotlin("plugin.serialization") version "2.1.21" // kotlin_version + kotlin("multiplatform") version "2.2.20" // kotlin_version + kotlin("plugin.serialization") version "2.2.20" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "2.1.21" +val kotlin_version = "2.2.20" val coroutines_version = "1.10.2" -val serialization_version = "1.8.1" -val ktor_version = "3.1.3" +val serialization_version = "1.9.0" +val ktor_version = "3.2.3" repositories { mavenCentral() @@ -38,7 +38,7 @@ kotlin { api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") + api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1") } } @@ -73,21 +73,23 @@ kotlin { api("io.ktor:ktor-client-js:$ktor_version") } } + + all { + languageSettings { + optIn("kotlin.time.ExperimentalTime") + } + } } } tasks { - register("iosTest") { + register("iosTest") { val device = project.findProperty("device")?.toString() ?: "iPhone 8" dependsOn("linkDebugTestIosX64") group = JavaBasePlugin.VERIFICATION_GROUP description = "Execute unit tests on ${device} simulator" - doLast { - val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") - exec { - commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) - } - } + val binary = kotlin.targets.getByName("iosX64").binaries.getTest("DEBUG") + commandLine("xcrun", "simctl", "spawn", device, binary.outputFile) } register("test") { dependsOn("allTests") diff --git a/samples/client/petstore/kotlin-multiplatform/docs/Order.md b/samples/client/petstore/kotlin-multiplatform/docs/Order.md index 6764fc5308dd..bc768aa93288 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/Order.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/Order.md @@ -7,7 +7,7 @@ | **id** | **kotlin.Long** | | [optional] | | **petId** | **kotlin.Long** | | [optional] | | **quantity** | **kotlin.Int** | | [optional] | -| **shipDate** | [**kotlinx.datetime.Instant**](kotlinx.datetime.Instant.md) | | [optional] | +| **shipDate** | [**kotlin.time.Instant**](kotlin.time.Instant.md) | | [optional] | | **status** | [**inline**](#Status) | Order Status | [optional] | | **complete** | **kotlin.Boolean** | | [optional] | diff --git a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.jar index cc4fdc293d0e..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties index 4670e1d441f3..7705927e949f 100644 --- a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Fri Sep 24 10:59:07 CEST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/petstore/kotlin-multiplatform/gradlew b/samples/client/petstore/kotlin-multiplatform/gradlew index 2fe81a7d95e4..f5feea6d6b11 100755 --- a/samples/client/petstore/kotlin-multiplatform/gradlew +++ b/samples/client/petstore/kotlin-multiplatform/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,80 +15,116 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -97,87 +133,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/kotlin-multiplatform/gradlew.bat b/samples/client/petstore/kotlin-multiplatform/gradlew.bat index 9618d8d9607c..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-multiplatform/gradlew.bat +++ b/samples/client/petstore/kotlin-multiplatform/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,10 +27,14 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @@ -37,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -51,48 +57,36 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt index 743d6650085d..0fda8e759f0c 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt @@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* +import kotlin.io.encoding.Base64 @Serializable(Base64ByteArray.Companion::class) class Base64ByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) - override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) + override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value)) + override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString())) } override fun equals(other: Any?): Boolean { @@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) { } override fun toString(): String { - return "Base64ByteArray(${hex(value)})" + return "Base64ByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt deleted file mode 100644 index fe511d948125..000000000000 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ /dev/null @@ -1,104 +0,0 @@ -package org.openapitools.client.infrastructure - -import io.ktor.utils.io.core.* -import kotlinx.io.Source -import kotlinx.io.readByteArray -import kotlin.experimental.and - -private val digits = "0123456789abcdef".toCharArray() -private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -private const val BASE64_MASK: Byte = 0x3f -private const val BASE64_PAD = '=' -private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) } - -private fun String.toCharArray(): CharArray = CharArray(length) { get(it) } -private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 } -private fun Int.toBase64(): Char = BASE64_ALPHABET[this] -private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK -internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64() -internal fun String.decodeBase64Bytes(): ByteArray = - buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray() - -/** - * Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(bytes: ByteArray): String { - val result = CharArray(bytes.size * 2) - var resultIndex = 0 - val digits = digits - - for (element in bytes) { - val b = element.toInt() and 0xff - result[resultIndex++] = digits[b shr 4] - result[resultIndex++] = digits[b and 0x0f] - } - - return result.concatToString() -} - -/** - * Decode bytes from HEX string. It should be no spaces and `0x` prefixes. - * - * Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt - */ -internal fun hex(s: String): ByteArray { - val result = ByteArray(s.length / 2) - for (idx in result.indices) { - val srcIdx = idx * 2 - val high = s[srcIdx].toString().toInt(16) shl 4 - val low = s[srcIdx + 1].toString().toInt(16) - result[idx] = (high or low).toByte() - } - - return result -} - -/** - * Encode [ByteReadPacket] in base64 format. - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -private fun Source.encodeBase64(): String = buildString { - val data = ByteArray(3) - while (remaining > 0) { - val read = readAvailable(data) - data.clearFrom(read) - - val padSize = (data.size - read) * 8 / 6 - val chunk = ((data[0].toInt() and 0xFF) shl 16) or - ((data[1].toInt() and 0xFF) shl 8) or - (data[2].toInt() and 0xFF) - - for (index in data.size downTo padSize) { - val char = (chunk shr (6 * index)) and BASE64_MASK.toInt() - append(char.toBase64()) - } - - repeat(padSize) { append(BASE64_PAD) } - } -} - -/** - * Decode [ByteReadPacket] from base64 format - * - * Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt - */ -@Suppress("DEPRECATION") -private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { - val data = ByteArray(4) - - while (remaining > 0) { - val read = readAvailable(data) - - val chunk = data.foldIndexed(0) { index, result, current -> - result or (current.fromBase64().toInt() shl ((3 - index) * 6)) - } - - for (index in data.size - 2 downTo (data.size - read)) { - val origin = (chunk shr (8 * index)) and 0xff - writeByte(origin.toByte()) - } - } -} diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt index 215042551235..5c4b29cd595f 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.* class OctetByteArray(val value: ByteArray) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) - override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) - override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) + override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString()) + override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray()) } override fun equals(other: Any?): Boolean { @@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) { } override fun toString(): String { - return "OctetByteArray(${hex(value)})" + return "OctetByteArray(${value.toHexString()})" } } diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index e763dafa5395..1ca87937d44c 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -40,7 +40,7 @@ data class Order ( @SerialName(value = "quantity") val quantity: kotlin.Int? = null, - @SerialName(value = "shipDate") val shipDate: kotlinx.datetime.Instant? = null, + @SerialName(value = "shipDate") val shipDate: kotlin.time.Instant? = null, /* Order Status */ @SerialName(value = "status") val status: Order.Status? = null, diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/README.md b/samples/client/petstore/kotlin-name-parameter-mappings/README.md index 34df18cb3088..ec26a723da14 100644 --- a/samples/client/petstore/kotlin-name-parameter-mappings/README.md +++ b/samples/client/petstore/kotlin-name-parameter-mappings/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/build.gradle b/samples/client/petstore/kotlin-name-parameter-mappings/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-name-parameter-mappings/build.gradle +++ b/samples/client/petstore/kotlin-name-parameter-mappings/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-name-parameter-mappings/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/gradlew b/samples/client/petstore/kotlin-name-parameter-mappings/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-name-parameter-mappings/gradlew +++ b/samples/client/petstore/kotlin-name-parameter-mappings/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/gradlew.bat b/samples/client/petstore/kotlin-name-parameter-mappings/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-name-parameter-mappings/gradlew.bat +++ b/samples/client/petstore/kotlin-name-parameter-mappings/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-nonpublic/README.md b/samples/client/petstore/kotlin-nonpublic/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-nonpublic/README.md +++ b/samples/client/petstore/kotlin-nonpublic/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-nonpublic/build.gradle +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-nonpublic/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-nonpublic/gradlew b/samples/client/petstore/kotlin-nonpublic/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-nonpublic/gradlew +++ b/samples/client/petstore/kotlin-nonpublic/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-nonpublic/gradlew.bat b/samples/client/petstore/kotlin-nonpublic/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-nonpublic/gradlew.bat +++ b/samples/client/petstore/kotlin-nonpublic/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-nullable/README.md b/samples/client/petstore/kotlin-nullable/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-nullable/README.md +++ b/samples/client/petstore/kotlin-nullable/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-nullable/build.gradle b/samples/client/petstore/kotlin-nullable/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-nullable/build.gradle +++ b/samples/client/petstore/kotlin-nullable/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-nullable/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-nullable/gradlew b/samples/client/petstore/kotlin-nullable/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-nullable/gradlew +++ b/samples/client/petstore/kotlin-nullable/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-nullable/gradlew.bat b/samples/client/petstore/kotlin-nullable/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-nullable/gradlew.bat +++ b/samples/client/petstore/kotlin-nullable/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/README.md b/samples/client/petstore/kotlin-retrofit2-jackson/README.md index 74fcacdd3a56..f82396251845 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/README.md +++ b/samples/client/petstore/kotlin-retrofit2-jackson/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/build.gradle b/samples/client/petstore/kotlin-retrofit2-jackson/build.gradle index d086a66db951..d2382a838b65 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2-jackson/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,10 +56,10 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" - implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-jackson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-retrofit2-jackson/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/gradlew b/samples/client/petstore/kotlin-retrofit2-jackson/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/gradlew +++ b/samples/client/petstore/kotlin-retrofit2-jackson/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-retrofit2-jackson/gradlew.bat b/samples/client/petstore/kotlin-retrofit2-jackson/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-retrofit2-jackson/gradlew.bat +++ b/samples/client/petstore/kotlin-retrofit2-jackson/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md index 74fcacdd3a56..f82396251845 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle index 89fac530a5ce..ea9b39756cb4 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -57,9 +57,9 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-kotlinx-serialization:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew.bat b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew.bat +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/README.md b/samples/client/petstore/kotlin-retrofit2-rx3/README.md index 74fcacdd3a56..f82396251845 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/README.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle b/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle index b5d6c0c4d67a..b971e459a100 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle @@ -2,15 +2,15 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.rxJava3Version = '3.1.8' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.rxJava3Version = '3.1.11' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -57,12 +57,12 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "io.reactivex.rxjava3:rxjava:$rxJava3Version" - implementation "com.squareup.retrofit2:adapter-rxjava3:2.10.0" + implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-retrofit2-rx3/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/gradlew b/samples/client/petstore/kotlin-retrofit2-rx3/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-retrofit2-rx3/gradlew +++ b/samples/client/petstore/kotlin-retrofit2-rx3/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/gradlew.bat b/samples/client/petstore/kotlin-retrofit2-rx3/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/gradlew.bat +++ b/samples/client/petstore/kotlin-retrofit2-rx3/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-retrofit2/README.md b/samples/client/petstore/kotlin-retrofit2/README.md index 74fcacdd3a56..f82396251845 100644 --- a/samples/client/petstore/kotlin-retrofit2/README.md +++ b/samples/client/petstore/kotlin-retrofit2/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2/build.gradle b/samples/client/petstore/kotlin-retrofit2/build.gradle index c7f6c8755de8..3fb2fc6b8eba 100644 --- a/samples/client/petstore/kotlin-retrofit2/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.retrofitVersion = '2.10.0' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.retrofitVersion = '3.0.0' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,10 +56,10 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" - implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" + implementation "com.squareup.okhttp3:logging-interceptor:5.1.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-retrofit2/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-retrofit2/gradlew b/samples/client/petstore/kotlin-retrofit2/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-retrofit2/gradlew +++ b/samples/client/petstore/kotlin-retrofit2/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-retrofit2/gradlew.bat b/samples/client/petstore/kotlin-retrofit2/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-retrofit2/gradlew.bat +++ b/samples/client/petstore/kotlin-retrofit2/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-string/README.md b/samples/client/petstore/kotlin-string/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-string/README.md +++ b/samples/client/petstore/kotlin-string/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-string/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-string/gradlew b/samples/client/petstore/kotlin-string/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-string/gradlew +++ b/samples/client/petstore/kotlin-string/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-string/gradlew.bat b/samples/client/petstore/kotlin-string/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-string/gradlew.bat +++ b/samples/client/petstore/kotlin-string/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-threetenbp/README.md b/samples/client/petstore/kotlin-threetenbp/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin-threetenbp/README.md +++ b/samples/client/petstore/kotlin-threetenbp/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index 0942ac6f4f93..1a219f17b11c 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,9 +55,9 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" - implementation "org.threeten:threetenbp:1.6.8" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" + implementation "org.threeten:threetenbp:1.7.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-threetenbp/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-threetenbp/gradlew b/samples/client/petstore/kotlin-threetenbp/gradlew old mode 100644 new mode 100755 index 9d0ce634cb11..51eb8bb47109 --- a/samples/client/petstore/kotlin-threetenbp/gradlew +++ b/samples/client/petstore/kotlin-threetenbp/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-threetenbp/gradlew.bat b/samples/client/petstore/kotlin-threetenbp/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-threetenbp/gradlew.bat +++ b/samples/client/petstore/kotlin-threetenbp/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin-uppercase-enum/README.md b/samples/client/petstore/kotlin-uppercase-enum/README.md index 6d8c9e7ec5db..4f25e13c0e82 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/README.md +++ b/samples/client/petstore/kotlin-uppercase-enum/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin-uppercase-enum/build.gradle b/samples/client/petstore/kotlin-uppercase-enum/build.gradle index 4f06acff349e..d6568983d230 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/build.gradle +++ b/samples/client/petstore/kotlin-uppercase-enum/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -56,8 +56,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-uppercase-enum/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-uppercase-enum/gradlew b/samples/client/petstore/kotlin-uppercase-enum/gradlew index 9d0ce634cb11..51eb8bb47109 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/gradlew +++ b/samples/client/petstore/kotlin-uppercase-enum/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin-uppercase-enum/gradlew.bat b/samples/client/petstore/kotlin-uppercase-enum/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/gradlew.bat +++ b/samples/client/petstore/kotlin-uppercase-enum/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/samples/client/petstore/kotlin/README.md b/samples/client/petstore/kotlin/README.md index 2f187ead26ce..ea6d6d1593be 100644 --- a/samples/client/petstore/kotlin/README.md +++ b/samples/client/petstore/kotlin/README.md @@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.7.21 -* Gradle 7.5 +* Kotlin 2.2.20 +* Gradle 8.14 ## Build diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index ae12ac6e1442..55821ba0b61f 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '8.7' + gradleVersion = '8.14.3' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.9.23' - ext.spotless_version = "6.25.0" + ext.kotlin_version = '2.2.20' + ext.spotless_version = "7.2.1" repositories { maven { url "https://repo1.maven.org/maven2" } @@ -55,8 +55,8 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.15.1" - implementation "com.squareup.moshi:moshi-adapters:1.15.1" - implementation "com.squareup.okhttp3:okhttp:4.12.0" + implementation "com.squareup.moshi:moshi-kotlin:1.15.2" + implementation "com.squareup.moshi:moshi-adapters:1.15.2" + implementation "com.squareup.okhttp3:okhttp:5.1.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar index d64cd4917707..2c3521197d7c 100644 Binary files a/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar and b/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.properties index e7646dead063..7705927e949f 100644 --- a/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin/gradlew b/samples/client/petstore/kotlin/gradlew index 9d0ce634cb11..51eb8bb47109 100755 --- a/samples/client/petstore/kotlin/gradlew +++ b/samples/client/petstore/kotlin/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/samples/client/petstore/kotlin/gradlew.bat b/samples/client/petstore/kotlin/gradlew.bat index 107acd32c4e6..9d21a21834d5 100644 --- a/samples/client/petstore/kotlin/gradlew.bat +++ b/samples/client/petstore/kotlin/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal