mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-13 16:03:43 +00:00
[kotlin-client][multiplatform] update Kotlin and libraries versions (#21353)
This commit is contained in:
parent
1f8787e53a
commit
959326048f
@ -1,17 +1,17 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.0.21" // kotlin_version{{/omitGradlePluginVersions}}
|
||||
kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.0.21" // kotlin_version{{/omitGradlePluginVersions}}
|
||||
kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}}
|
||||
kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}}
|
||||
}
|
||||
|
||||
group = "{{groupId}}"
|
||||
version = "{{artifactVersion}}"
|
||||
|
||||
val kotlin_version = "2.0.21"
|
||||
val coroutines_version = "1.9.0"
|
||||
val serialization_version = "1.7.3"
|
||||
val ktor_version = "3.0.3"
|
||||
val kotlin_version = "2.1.21"
|
||||
val coroutines_version = "1.10.2"
|
||||
val serialization_version = "1.8.1"
|
||||
val ktor_version = "3.1.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.4.1")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
|
||||
{{/kotlinx-datetime}}
|
||||
}
|
||||
}
|
||||
@ -79,12 +79,6 @@ kotlin {
|
||||
api("io.ktor:ktor-client-js:$ktor_version")
|
||||
}
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.apply {
|
||||
optIn("kotlin.Experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
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()
|
||||
@ -14,7 +16,8 @@ private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it
|
||||
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()
|
||||
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.
|
||||
@ -57,7 +60,7 @@ internal fun hex(s: String): ByteArray {
|
||||
*
|
||||
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
|
||||
*/
|
||||
private fun ByteReadPacket.encodeBase64(): String = buildString {
|
||||
private fun Source.encodeBase64(): String = buildString {
|
||||
val data = ByteArray(3)
|
||||
while (remaining > 0) {
|
||||
val read = readAvailable(data)
|
||||
|
@ -1,17 +1,17 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.0.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.0.21" // kotlin_version
|
||||
kotlin("multiplatform") version "2.1.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.1.21" // kotlin_version
|
||||
}
|
||||
|
||||
group = "org.openapitools"
|
||||
version = "1.0.0"
|
||||
|
||||
val kotlin_version = "2.0.21"
|
||||
val coroutines_version = "1.9.0"
|
||||
val serialization_version = "1.7.3"
|
||||
val ktor_version = "3.0.3"
|
||||
val kotlin_version = "2.1.21"
|
||||
val coroutines_version = "1.10.2"
|
||||
val serialization_version = "1.8.1"
|
||||
val ktor_version = "3.1.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.4.1")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,12 +73,6 @@ kotlin {
|
||||
api("io.ktor:ktor-client-js:$ktor_version")
|
||||
}
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.apply {
|
||||
optIn("kotlin.Experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
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()
|
||||
@ -14,7 +16,8 @@ private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it
|
||||
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()
|
||||
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.
|
||||
@ -57,7 +60,7 @@ internal fun hex(s: String): ByteArray {
|
||||
*
|
||||
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
|
||||
*/
|
||||
private fun ByteReadPacket.encodeBase64(): String = buildString {
|
||||
private fun Source.encodeBase64(): String = buildString {
|
||||
val data = ByteArray(3)
|
||||
while (remaining > 0) {
|
||||
val read = readAvailable(data)
|
||||
|
@ -1,17 +1,17 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.0.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.0.21" // kotlin_version
|
||||
kotlin("multiplatform") version "2.1.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.1.21" // kotlin_version
|
||||
}
|
||||
|
||||
group = "org.openapitools"
|
||||
version = "1.0.0"
|
||||
|
||||
val kotlin_version = "2.0.21"
|
||||
val coroutines_version = "1.9.0"
|
||||
val serialization_version = "1.7.3"
|
||||
val ktor_version = "3.0.3"
|
||||
val kotlin_version = "2.1.21"
|
||||
val coroutines_version = "1.10.2"
|
||||
val serialization_version = "1.8.1"
|
||||
val ktor_version = "3.1.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.4.1")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,12 +73,6 @@ kotlin {
|
||||
api("io.ktor:ktor-client-js:$ktor_version")
|
||||
}
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.apply {
|
||||
optIn("kotlin.Experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
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()
|
||||
@ -14,7 +16,8 @@ private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it
|
||||
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()
|
||||
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.
|
||||
@ -57,7 +60,7 @@ internal fun hex(s: String): ByteArray {
|
||||
*
|
||||
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
|
||||
*/
|
||||
private fun ByteReadPacket.encodeBase64(): String = buildString {
|
||||
private fun Source.encodeBase64(): String = buildString {
|
||||
val data = ByteArray(3)
|
||||
while (remaining > 0) {
|
||||
val read = readAvailable(data)
|
||||
|
@ -1,17 +1,17 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.0.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.0.21" // kotlin_version
|
||||
kotlin("multiplatform") version "2.1.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.1.21" // kotlin_version
|
||||
}
|
||||
|
||||
group = "org.openapitools"
|
||||
version = "1.0.0"
|
||||
|
||||
val kotlin_version = "2.0.21"
|
||||
val coroutines_version = "1.9.0"
|
||||
val serialization_version = "1.7.3"
|
||||
val ktor_version = "3.0.3"
|
||||
val kotlin_version = "2.1.21"
|
||||
val coroutines_version = "1.10.2"
|
||||
val serialization_version = "1.8.1"
|
||||
val ktor_version = "3.1.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.4.1")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,12 +73,6 @@ kotlin {
|
||||
api("io.ktor:ktor-client-js:$ktor_version")
|
||||
}
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.apply {
|
||||
optIn("kotlin.Experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
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()
|
||||
@ -14,7 +16,8 @@ private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it
|
||||
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()
|
||||
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.
|
||||
@ -57,7 +60,7 @@ internal fun hex(s: String): ByteArray {
|
||||
*
|
||||
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
|
||||
*/
|
||||
private fun ByteReadPacket.encodeBase64(): String = buildString {
|
||||
private fun Source.encodeBase64(): String = buildString {
|
||||
val data = ByteArray(3)
|
||||
while (remaining > 0) {
|
||||
val read = readAvailable(data)
|
||||
|
@ -1,17 +1,17 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.0.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.0.21" // kotlin_version
|
||||
kotlin("multiplatform") version "2.1.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.1.21" // kotlin_version
|
||||
}
|
||||
|
||||
group = "org.openapitools"
|
||||
version = "1.0.0"
|
||||
|
||||
val kotlin_version = "2.0.21"
|
||||
val coroutines_version = "1.9.0"
|
||||
val serialization_version = "1.7.3"
|
||||
val ktor_version = "3.0.3"
|
||||
val kotlin_version = "2.1.21"
|
||||
val coroutines_version = "1.10.2"
|
||||
val serialization_version = "1.8.1"
|
||||
val ktor_version = "3.1.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.4.1")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,12 +73,6 @@ kotlin {
|
||||
api("io.ktor:ktor-client-js:$ktor_version")
|
||||
}
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.apply {
|
||||
optIn("kotlin.Experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
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()
|
||||
@ -14,7 +16,8 @@ private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it
|
||||
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()
|
||||
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.
|
||||
@ -57,7 +60,7 @@ internal fun hex(s: String): ByteArray {
|
||||
*
|
||||
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
|
||||
*/
|
||||
private fun ByteReadPacket.encodeBase64(): String = buildString {
|
||||
private fun Source.encodeBase64(): String = buildString {
|
||||
val data = ByteArray(3)
|
||||
while (remaining > 0) {
|
||||
val read = readAvailable(data)
|
||||
|
@ -1,17 +1,17 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.0.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.0.21" // kotlin_version
|
||||
kotlin("multiplatform") version "2.1.21" // kotlin_version
|
||||
kotlin("plugin.serialization") version "2.1.21" // kotlin_version
|
||||
}
|
||||
|
||||
group = "org.openapitools"
|
||||
version = "1.0.0"
|
||||
|
||||
val kotlin_version = "2.0.21"
|
||||
val coroutines_version = "1.9.0"
|
||||
val serialization_version = "1.7.3"
|
||||
val ktor_version = "3.0.3"
|
||||
val kotlin_version = "2.1.21"
|
||||
val coroutines_version = "1.10.2"
|
||||
val serialization_version = "1.8.1"
|
||||
val ktor_version = "3.1.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.4.1")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,12 +73,6 @@ kotlin {
|
||||
api("io.ktor:ktor-client-js:$ktor_version")
|
||||
}
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.apply {
|
||||
optIn("kotlin.Experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
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()
|
||||
@ -14,7 +16,8 @@ private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it
|
||||
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()
|
||||
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.
|
||||
@ -57,7 +60,7 @@ internal fun hex(s: String): ByteArray {
|
||||
*
|
||||
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
|
||||
*/
|
||||
private fun ByteReadPacket.encodeBase64(): String = buildString {
|
||||
private fun Source.encodeBase64(): String = buildString {
|
||||
val data = ByteArray(3)
|
||||
while (remaining > 0) {
|
||||
val read = readAvailable(data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user