Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/compose-example/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -92,7 +92,7 @@ private fun <Request : Message, Response : Message> grpcImplementation(
): Flow<Response> {
val metadata = callOptions.metadata

return flow {
return channelFlow {
channel.registerRpc()

try {
Expand Down Expand Up @@ -166,6 +166,7 @@ private fun <Request : Message, Response : Message> grpcImplementation(
throw StatusException.internal("Unexpected timeout except caught.", e)
}
} catch (t: Throwable) {
t.printStackTrace()
throw StatusException(
status = Status(
code = Code.UNAVAILABLE,
Expand All @@ -179,7 +180,7 @@ private fun <Request : Message, Response : Message> grpcImplementation(
}
}

private suspend fun <T : Message> FlowCollector<T>.readResponse(
private suspend fun <T : Message> ProducerScope<T>.readResponse(
channel: ByteReadChannel,
methodDescriptor: MethodDescriptor,
deserializer: MessageDeserializer<T>,
Expand All @@ -204,7 +205,7 @@ private suspend fun <T : Message> FlowCollector<T>.readResponse(
interceptor.onReceiveMessage(methodDescriptor, currentMessage)
}

emit(actualMessage)
send(actualMessage)
} else if (flag == 0x80.toUByte()) {
val headers = decodeHeadersFrame(payload)

Expand Down
12 changes: 6 additions & 6 deletions kmp-grpc-native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading