diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 829dd7c0..22de322a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: --verbose \ --header "Authorization: Bearer $TOKEN" \ --form bundle=@kmp-grpc-core-${{ inputs.version }}.zip \ - "https://central.sonatype.com/api/v1/publisher/upload?publishingType=USER_MANAGED&name=io.github.timortel%3Akmp-grpc-core%3A${{ inputs.version }} + "https://central.sonatype.com/api/v1/publisher/upload?publishingType=USER_MANAGED&name=io.github.timortel%3Akmp-grpc-core%3A${{ inputs.version }}") echo "deployment_id=$RESPONSE" >> "$GITHUB_OUTPUT" - name: Wait for deployment to be ready diff --git a/examples/compose-example/gradle/libs.versions.toml b/examples/compose-example/gradle/libs.versions.toml index 86ac19d6..f97b1b94 100644 --- a/examples/compose-example/gradle/libs.versions.toml +++ b/examples/compose-example/gradle/libs.versions.toml @@ -11,7 +11,7 @@ compose-multiplatform = "1.8.2" grpcKotlinStub = "1.5.0" grpc = "1.76.0" junit = "4.13.2" -kotlin = "2.2.21" +kotlin = "2.3.10" kotlinx-coroutines = "1.10.2" kmpGrpc = "2.0.0" protobuf = "3.25.6" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 04af1f91..a2c1380c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,20 +7,20 @@ androidGradlePlugin = "8.11.2" androidCompileSdk = "36" androidMinSdk = "21" -kotlin = "2.2.21" -kotlinxIo = "0.8.0" +kotlin = "2.3.10" +kotlinxIo = "0.9.0" kotlinxCoroutines = "1.10.2" -ktor = "3.3.2" -okio = "3.16.3" +ktor = "3.4.1" +okio = "3.16.4" -grpcJvm = "1.76.0" +grpcJvm = "1.79.0" grpcKotlin = "1.5.0" # Plugin Relevant antlr = "4.13.2" -gradlePluginPublish = "2.0.0" -buildConfigPlugin = "5.7.1" +gradlePluginPublish = "2.1.0" +buildConfigPlugin = "6.0.9" kotlinPoet = "2.2.0" diff --git a/kmp-grpc-core/src/jsTargetCommon/kotlin/io/github/timortel/kmpgrpc/core/rpc/rpcimplementation.kt b/kmp-grpc-core/src/jsTargetCommon/kotlin/io/github/timortel/kmpgrpc/core/rpc/rpcimplementation.kt index f4c7670d..5a1221c5 100644 --- a/kmp-grpc-core/src/jsTargetCommon/kotlin/io/github/timortel/kmpgrpc/core/rpc/rpcimplementation.kt +++ b/kmp-grpc-core/src/jsTargetCommon/kotlin/io/github/timortel/kmpgrpc/core/rpc/rpcimplementation.kt @@ -15,9 +15,9 @@ import io.ktor.client.statement.* import io.ktor.http.* import io.ktor.utils.io.* import io.ktor.utils.io.core.* +import kotlinx.coroutines.channels.ProducerScope import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.FlowCollector -import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.channelFlow import kotlinx.io.Buffer import kotlinx.io.Source import kotlinx.io.readByteArray @@ -92,7 +92,7 @@ private fun grpcImplementation( ): Flow { val metadata = callOptions.metadata - return flow { + return channelFlow { channel.registerRpc() try { @@ -166,6 +166,7 @@ private fun grpcImplementation( throw StatusException.internal("Unexpected timeout except caught.", e) } } catch (t: Throwable) { + t.printStackTrace() throw StatusException( status = Status( code = Code.UNAVAILABLE, @@ -179,7 +180,7 @@ private fun grpcImplementation( } } -private suspend fun FlowCollector.readResponse( +private suspend fun ProducerScope.readResponse( channel: ByteReadChannel, methodDescriptor: MethodDescriptor, deserializer: MessageDeserializer, @@ -204,7 +205,7 @@ private suspend fun FlowCollector.readResponse( interceptor.onReceiveMessage(methodDescriptor, currentMessage) } - emit(actualMessage) + send(actualMessage) } else if (flag == 0x80.toUByte()) { val headers = decodeHeadersFrame(payload) diff --git a/kmp-grpc-native/Cargo.toml b/kmp-grpc-native/Cargo.toml index cb452d29..55f5f2c9 100644 --- a/kmp-grpc-native/Cargo.toml +++ b/kmp-grpc-native/Cargo.toml @@ -6,13 +6,13 @@ edition = "2024" license = "Apache-2.0" [dependencies] -tonic = { version = "0.14.2", features = ["channel", "tls-ring", "tls-webpki-roots"] } -tokio = { version = "1.47.1", features = ["rt-multi-thread"] } -rustls-webpki = "0.103.8" -bytes = "1.11.0" +tonic = { version = "0.14.5", features = ["channel", "tls-ring", "tls-webpki-roots"] } +tokio = { version = "1.50.0", features = ["rt-multi-thread"] } +rustls-webpki = "0.103.9" +bytes = "1.11.1" once_cell = "1.21.3" -log = "0.4.28" -env_logger = "0.11.8" +log = "0.4.29" +env_logger = "0.11.9" [lib] crate-type = ["staticlib"]