From ae86ff7aaf5a938ce8d09ae18204b23c5ca84231 Mon Sep 17 00:00:00 2001 From: Fabio Bombardi <16268789+shadowsheep1@users.noreply.github.com> Date: Wed, 13 Oct 2021 09:56:28 +0200 Subject: [PATCH] Kotlin multiplatform updated to fit future Kotlin 1.6.0 release (#10468) * Update Kotlin Version to 1.6.0-M1 Update Multiplatform Plugin to 1.6.0-M1 Update Gragle to 7.2 Update AGP to 7.0.2 Update samples accordingle Resolve: https://github.com/OpenAPITools/openapi-generator/issues/10467 * Removes local.properties from kotlin-multiplatform petstore client, that was accidentally added * Use the latest kotlin stable version 1.5.31 * update samples Co-authored-by: William Cheng --- .../libraries/multiplatform/auth/HttpBasicAuth.kt.mustache | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 5 +++-- .../kotlin/org/openapitools/client/auth/HttpBasicAuth.kt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache index ef6c5888ae1..26325424e5d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache @@ -7,7 +7,7 @@ class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @InternalAPI + @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") 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 6ce793f21e8..a40165ee36c 100644 --- a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Fri Sep 24 10:59:07 CEST 2021 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 5f0a52c1951..40276dbb985 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -7,7 +7,7 @@ class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @InternalAPI + @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "")