Skip to content

Commit 88a4956

Browse files
committed
grpc: Reduce dependencies
1 parent 20019b1 commit 88a4956

File tree

4 files changed

+7
-55
lines changed

4 files changed

+7
-55
lines changed

grpc/grpc-client/build.gradle.kts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import kotlinx.rpc.internal.InternalRpcApi
99
plugins {
1010
alias(libs.plugins.conventions.kmp)
1111
alias(libs.plugins.kotlinx.rpc)
12-
13-
// TODO: Check if we can drop these plugins
14-
alias(libs.plugins.atomicfu)
15-
alias(libs.plugins.serialization) // for tests
1612
}
1713

1814
kotlin {
@@ -24,34 +20,12 @@ kotlin {
2420
commonMain {
2521
dependencies {
2622
api(projects.grpc.grpcCore)
27-
28-
implementation(libs.atomicfu)
29-
implementation(libs.kotlinx.io.core)
30-
}
31-
}
32-
33-
jvmMain {
34-
dependencies {
35-
// TODO: Check if we can drop the API dependencies
36-
api(libs.grpc.api)
37-
api(libs.grpc.util)
38-
api(libs.grpc.stub)
39-
api(libs.grpc.protobuf)
40-
api(libs.grpc.protobuf.lite)
41-
implementation(libs.grpc.kotlin.stub) // causes problems to jpms if api
42-
}
43-
}
44-
45-
jvmTest {
46-
dependencies {
47-
implementation(libs.grpc.netty)
4823
}
4924
}
5025

5126
nativeMain {
5227
dependencies {
53-
// required for status.proto
54-
implementation(projects.protobuf.protobufCore)
28+
implementation(libs.atomicfu)
5529
}
5630
}
5731
}

grpc/grpc-ktor-server/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ kotlin {
2525
dependencies {
2626
implementation(kotlin("test"))
2727

28-
implementation(projects.grpc.grpcCore)
28+
implementation(projects.grpc.grpcClient)
2929
implementation(projects.grpc.grpcKtorServer)
3030

3131
implementation(libs.grpc.kotlin.stub)

grpc/grpc-ktor-server/src/jvmTest/kotlin/kotlinx/rpc/grpc/ktor/server/test/TestServer.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package kotlinx.rpc.grpc.ktor.server.test
66

77
import io.ktor.server.testing.*
8-
import kotlinx.rpc.grpc.GrpcClient
8+
import kotlinx.rpc.grpc.client.GrpcClient
99
import kotlinx.rpc.grpc.ktor.server.grpc
1010
import kotlinx.rpc.withService
1111
import kotlin.test.Test
@@ -25,7 +25,9 @@ class TestServer {
2525
fun testPlainRequests() = testApplication {
2626
application {
2727
grpc(PORT) {
28-
registerService<KtorTestService> { KtorTestServiceImpl() }
28+
services {
29+
registerService<KtorTestService> { KtorTestServiceImpl() }
30+
}
2931
}
3032
}
3133

grpc/grpc-server/build.gradle.kts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import kotlinx.rpc.internal.InternalRpcApi
99
plugins {
1010
alias(libs.plugins.conventions.kmp)
1111
alias(libs.plugins.kotlinx.rpc)
12-
13-
// TODO: Check if we can drop these plugins
14-
alias(libs.plugins.atomicfu)
15-
alias(libs.plugins.serialization) // for tests
1612
}
1713

1814
kotlin {
@@ -26,32 +22,12 @@ kotlin {
2622
api(projects.grpc.grpcCore)
2723

2824
implementation(libs.atomicfu)
29-
implementation(libs.kotlinx.io.core)
30-
}
31-
}
32-
33-
jvmMain {
34-
dependencies {
35-
// TODO: Check if we can drop the API dependencies
36-
api(libs.grpc.api)
37-
api(libs.grpc.util)
38-
api(libs.grpc.stub)
39-
api(libs.grpc.protobuf)
40-
api(libs.grpc.protobuf.lite)
41-
implementation(libs.grpc.kotlin.stub) // causes problems to jpms if api
42-
}
43-
}
44-
45-
jvmTest {
46-
dependencies {
47-
implementation(libs.grpc.netty)
4825
}
4926
}
5027

5128
nativeMain {
5229
dependencies {
53-
// required for status.proto
54-
implementation(projects.protobuf.protobufCore)
30+
implementation(libs.kotlinx.io.core)
5531
}
5632
}
5733
}

0 commit comments

Comments
 (0)