From 04ffde421db2e73d7188e73e758f340f60a6ece1 Mon Sep 17 00:00:00 2001 From: sergeych Date: Tue, 26 Nov 2024 18:57:59 +0700 Subject: [PATCH] 0.5.1-SNAPSHOT: crypto2 upgraded --- .idea/misc.xml | 2 +- README.md | 2 + build.gradle.kts | 58 ++++++++++--------- .../kiloparsec/adapter/websocketClient.kt | 6 +- 4 files changed, 36 insertions(+), 32 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index efbe595..e9349bf 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,7 +3,7 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index 6f271a0..66ba3d2 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ provides the following transports: ### Note on version compatibility +Version 0.5.1 could be backward incompatible due to upgrade of the crypto2. + Protocols >= 0.3.0 are not binary compatible with previous version due to more compact binary format. The format from 0.3.0 onwards is supposed to keep compatible. diff --git a/build.gradle.kts b/build.gradle.kts index 7b17d71..854d953 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "net.sergeych" -version = "0.4.6-SNAPSHOT" +version = "0.5.1-SNAPSHOT" repositories { mavenCentral() @@ -28,13 +28,15 @@ kotlin { } nodejs() } - macosArm64() - iosX64() - iosArm64() - iosSimulatorArm64() +// macosArm64() +// iosX64() +// iosArm64() +// iosSimulatorArm64() linuxX64() linuxArm64() - macosX64() +// macosX64() +// macosX64() + mingwX64() val ktor_version = "2.3.12" @@ -50,7 +52,7 @@ kotlin { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.2") api("io.ktor:ktor-client-core:$ktor_version") - api("net.sergeych:crypto2:0.5.7") + api("net.sergeych:crypto2:0.7.1+") } } val ktorSocketMain by creating { @@ -89,27 +91,27 @@ kotlin { } } val jsTest by getting - val macosArm64Main by getting { - dependsOn(ktorSocketMain) - } - val macosArm64Test by getting { - dependsOn(ktorSocketTest) - } - val macosX64Main by getting { - dependsOn(ktorSocketMain) - } - val iosX64Main by getting { - dependsOn(ktorSocketMain) - } - val iosX64Test by getting { - dependsOn(ktorSocketTest) - } - val iosArm64Main by getting { - dependsOn(ktorSocketMain) - } - val iosArm64Test by getting { - dependsOn(ktorSocketTest) - } +// val macosArm64Main by getting { +// dependsOn(ktorSocketMain) +// } +// val macosArm64Test by getting { +// dependsOn(ktorSocketTest) +// } +// val macosX64Main by getting { +// dependsOn(ktorSocketMain) +// } +// val iosX64Main by getting { +// dependsOn(ktorSocketMain) +// } +// val iosX64Test by getting { +// dependsOn(ktorSocketTest) +// } +// val iosArm64Main by getting { +// dependsOn(ktorSocketMain) +// } +// val iosArm64Test by getting { +// dependsOn(ktorSocketTest) +// } val linuxArm64Main by getting { dependsOn(ktorSocketMain) } diff --git a/src/commonMain/kotlin/net/sergeych/kiloparsec/adapter/websocketClient.kt b/src/commonMain/kotlin/net/sergeych/kiloparsec/adapter/websocketClient.kt index a86d1aa..12ea5fa 100644 --- a/src/commonMain/kotlin/net/sergeych/kiloparsec/adapter/websocketClient.kt +++ b/src/commonMain/kotlin/net/sergeych/kiloparsec/adapter/websocketClient.kt @@ -22,7 +22,7 @@ import net.sergeych.tools.AtomicCounter private val counter = AtomicCounter() /** - * Shortcut to create websocket client. Use [webSocketTransportDevice] with [KiloClient] + * Shortcut to create websocket client. Use [websocketTransportDevice] with [KiloClient] * for fine-grained control. */ fun websocketClient( @@ -35,7 +35,7 @@ fun websocketClient( }, ): KiloClient { return KiloClient(clientInterface, secretKey) { - KiloConnectionData(webSocketTransportDevice(path), sessionMaker()) + KiloConnectionData(websocketTransportDevice(path), sessionMaker()) } } @@ -44,7 +44,7 @@ fun websocketClient( * @param path websocket path (must start with ws:// or wss:// and contain a path part) * @client use default [HttpClient], it installs [WebSockets] plugin */ -fun webSocketTransportDevice( +fun websocketTransportDevice( path: String, client: HttpClient = HttpClient { install(WebSockets) }, ): Transport.Device {