Skip to content

Commit c41877d

Browse files
authored
Release 2.0.0 (#130)
* Add naming strategy. Set default naming strategy to Kotlin idiomatic. Extend name conflict resolution to classes and files. * Change conflict resolution strategy for files to numbers instead of underscores. Add tests * Add LEGACY naming strategy. Fix tests. * Fix behavior of LEGACY naming strategy. * Fix source generation. Fix tests. includeWellKnownTypes may only be used with KOTLIN_IDIOMATIC naming strategy. * Use KOTLIN_IDIOMATIC naming strategy in tests * Fix tests * Also consider extensions for isInitialized. * Bump versions * Bump versions * Fix tests. * Update crates * Use channelflow on js targets for rpc implementation * Fix release script.
1 parent 158b59d commit c41877d

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
--verbose \
4545
--header "Authorization: Bearer $TOKEN" \
4646
--form bundle=@kmp-grpc-core-${{ inputs.version }}.zip \
47-
"https://central.sonatype.com/api/v1/publisher/upload?publishingType=USER_MANAGED&name=io.github.timortel%3Akmp-grpc-core%3A${{ inputs.version }}
47+
"https://central.sonatype.com/api/v1/publisher/upload?publishingType=USER_MANAGED&name=io.github.timortel%3Akmp-grpc-core%3A${{ inputs.version }}")
4848
echo "deployment_id=$RESPONSE" >> "$GITHUB_OUTPUT"
4949
5050
- name: Wait for deployment to be ready

examples/compose-example/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ compose-multiplatform = "1.8.2"
1111
grpcKotlinStub = "1.5.0"
1212
grpc = "1.76.0"
1313
junit = "4.13.2"
14-
kotlin = "2.2.21"
14+
kotlin = "2.3.10"
1515
kotlinx-coroutines = "1.10.2"
1616
kmpGrpc = "2.0.0"
1717
protobuf = "3.25.6"

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ androidGradlePlugin = "8.11.2"
77
androidCompileSdk = "36"
88
androidMinSdk = "21"
99

10-
kotlin = "2.2.21"
11-
kotlinxIo = "0.8.0"
10+
kotlin = "2.3.10"
11+
kotlinxIo = "0.9.0"
1212
kotlinxCoroutines = "1.10.2"
1313

14-
ktor = "3.3.2"
15-
okio = "3.16.3"
14+
ktor = "3.4.1"
15+
okio = "3.16.4"
1616

17-
grpcJvm = "1.76.0"
17+
grpcJvm = "1.79.0"
1818
grpcKotlin = "1.5.0"
1919

2020
# Plugin Relevant
2121
antlr = "4.13.2"
22-
gradlePluginPublish = "2.0.0"
23-
buildConfigPlugin = "5.7.1"
22+
gradlePluginPublish = "2.1.0"
23+
buildConfigPlugin = "6.0.9"
2424

2525
kotlinPoet = "2.2.0"
2626

kmp-grpc-core/src/jsTargetCommon/kotlin/io/github/timortel/kmpgrpc/core/rpc/rpcimplementation.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import io.ktor.client.statement.*
1515
import io.ktor.http.*
1616
import io.ktor.utils.io.*
1717
import io.ktor.utils.io.core.*
18+
import kotlinx.coroutines.channels.ProducerScope
1819
import kotlinx.coroutines.flow.Flow
19-
import kotlinx.coroutines.flow.FlowCollector
20-
import kotlinx.coroutines.flow.flow
20+
import kotlinx.coroutines.flow.channelFlow
2121
import kotlinx.io.Buffer
2222
import kotlinx.io.Source
2323
import kotlinx.io.readByteArray
@@ -92,7 +92,7 @@ private fun <Request : Message, Response : Message> grpcImplementation(
9292
): Flow<Response> {
9393
val metadata = callOptions.metadata
9494

95-
return flow {
95+
return channelFlow {
9696
channel.registerRpc()
9797

9898
try {
@@ -166,6 +166,7 @@ private fun <Request : Message, Response : Message> grpcImplementation(
166166
throw StatusException.internal("Unexpected timeout except caught.", e)
167167
}
168168
} catch (t: Throwable) {
169+
t.printStackTrace()
169170
throw StatusException(
170171
status = Status(
171172
code = Code.UNAVAILABLE,
@@ -179,7 +180,7 @@ private fun <Request : Message, Response : Message> grpcImplementation(
179180
}
180181
}
181182

182-
private suspend fun <T : Message> FlowCollector<T>.readResponse(
183+
private suspend fun <T : Message> ProducerScope<T>.readResponse(
183184
channel: ByteReadChannel,
184185
methodDescriptor: MethodDescriptor,
185186
deserializer: MessageDeserializer<T>,
@@ -204,7 +205,7 @@ private suspend fun <T : Message> FlowCollector<T>.readResponse(
204205
interceptor.onReceiveMessage(methodDescriptor, currentMessage)
205206
}
206207

207-
emit(actualMessage)
208+
send(actualMessage)
208209
} else if (flag == 0x80.toUByte()) {
209210
val headers = decodeHeadersFrame(payload)
210211

kmp-grpc-native/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ edition = "2024"
66
license = "Apache-2.0"
77

88
[dependencies]
9-
tonic = { version = "0.14.2", features = ["channel", "tls-ring", "tls-webpki-roots"] }
10-
tokio = { version = "1.47.1", features = ["rt-multi-thread"] }
11-
rustls-webpki = "0.103.8"
12-
bytes = "1.11.0"
9+
tonic = { version = "0.14.5", features = ["channel", "tls-ring", "tls-webpki-roots"] }
10+
tokio = { version = "1.50.0", features = ["rt-multi-thread"] }
11+
rustls-webpki = "0.103.9"
12+
bytes = "1.11.1"
1313
once_cell = "1.21.3"
14-
log = "0.4.28"
15-
env_logger = "0.11.8"
14+
log = "0.4.29"
15+
env_logger = "0.11.9"
1616

1717
[lib]
1818
crate-type = ["staticlib"]

0 commit comments

Comments
 (0)