Skip to content

Commit b8fbc1b

Browse files
committed
Updated grpc dependencies
1 parent 37af5f1 commit b8fbc1b

File tree

4 files changed

+39
-20
lines changed

4 files changed

+39
-20
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
@@ -12,7 +12,7 @@ plugins {
1212
alias(libs.plugins.serialization) apply false
1313
alias(libs.plugins.kotlinx.rpc) apply false
1414
alias(libs.plugins.conventions.kover)
15-
id("com.google.protobuf") version "0.9.4" apply false
15+
alias(libs.plugins.protobuf) apply false
1616
alias(libs.plugins.conventions.gradle.doctor)
1717
alias(libs.plugins.atomicfu)
1818
id("build-util")

grpc/grpc-core/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ kotlin {
1919

2020
jvmMain {
2121
dependencies {
22-
implementation("io.grpc:grpc-util:1.68.2")
23-
implementation("io.grpc:grpc-stub:1.68.2")
24-
implementation("io.grpc:grpc-protobuf:1.68.2")
25-
implementation("io.grpc:grpc-kotlin-stub:1.4.1")
26-
implementation("com.google.protobuf:protobuf-java-util:4.28.2")
27-
implementation("com.google.protobuf:protobuf-kotlin:4.28.2")
22+
implementation(libs.grpc.util)
23+
implementation(libs.grpc.stub)
24+
implementation(libs.grpc.protobuf)
25+
implementation(libs.grpc.kotlin.stub)
26+
implementation(libs.protobuf.java.util)
27+
implementation(libs.protobuf.kotlin)
2828
}
2929
}
3030
}

protobuf-plugin/build.gradle.kts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
@@ -8,24 +8,25 @@ plugins {
88
alias(libs.plugins.conventions.jvm)
99
alias(libs.plugins.kotlinx.rpc)
1010
alias(libs.plugins.serialization)
11-
id("com.google.protobuf")
11+
alias(libs.plugins.protobuf)
1212
}
1313

1414
dependencies {
15-
implementation("com.google.protobuf:protobuf-java:3.24.1")
15+
implementation(libs.protobuf.java)
1616

1717
implementation(libs.slf4j.api)
1818
implementation(libs.logback.classic)
1919

2020
testImplementation(projects.grpc.grpcCore)
2121
testImplementation(libs.coroutines.core)
2222
testImplementation(libs.kotlin.test)
23-
testImplementation("io.grpc:grpc-stub:1.68.2")
24-
testImplementation("io.grpc:grpc-netty:1.68.2")
25-
testImplementation("io.grpc:grpc-protobuf:1.68.2")
26-
testImplementation("io.grpc:grpc-kotlin-stub:1.4.1")
27-
testImplementation("com.google.protobuf:protobuf-java-util:4.28.2")
28-
testImplementation("com.google.protobuf:protobuf-kotlin:4.28.2")
23+
24+
testImplementation(libs.grpc.stub)
25+
testImplementation(libs.grpc.netty)
26+
testImplementation(libs.grpc.protobuf)
27+
testImplementation(libs.grpc.kotlin.stub)
28+
testImplementation(libs.protobuf.java.util)
29+
testImplementation(libs.protobuf.kotlin)
2930
}
3031

3132
sourceSets {
@@ -67,7 +68,7 @@ val buildDirPath: String = project.layout.buildDirectory.get().asFile.absolutePa
6768

6869
protobuf {
6970
protoc {
70-
artifact = "com.google.protobuf:protoc:3.24.1"
71+
artifact = libs.protoc.get().toString()
7172
}
7273

7374
plugins {
@@ -76,11 +77,11 @@ protobuf {
7677
}
7778

7879
create("grpc") {
79-
artifact = "io.grpc:protoc-gen-grpc-java:1.57.2"
80+
artifact = libs.grpc.protoc.gen.java.get().toString()
8081
}
8182

8283
create("grpckt") {
83-
artifact = "io.grpc:protoc-gen-grpc-kotlin:1.3.1:jdk8@jar"
84+
artifact = libs.grpc.protoc.gen.kotlin.get().toString() + ":jdk8@jar"
8485
}
8586
}
8687

versions-root/libs.versions.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ intellij = "233.13135.128"
2121
gradle-doctor = "0.10.0"
2222
kotlinx-browser = "0.3"
2323
shadow-jar = "9.0.0-beta4"
24+
grpc = "1.69.0"
25+
grpc-kotlin = "1.4.1"
26+
protobuf = "4.29.3"
27+
protobuf-gradle = "0.9.4"
2428

2529
# Stub versions – relpaced based on kotlin, mostly for gradle-related (plugins) dependencies
2630
# but also for dependencies for compiler-specific modules.
@@ -87,6 +91,19 @@ junit5-platform-launcher = { module = "org.junit.platform:junit-platform-launche
8791
junit5-platform-runner = { module = "org.junit.platform:junit-platform-runner" }
8892
junit5-platform-suite-api = { module = "org.junit.platform:junit-platform-suite-api" }
8993

94+
# grpc and protobuf
95+
protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
96+
protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" }
97+
protobuf-java-util = { module = "com.google.protobuf:protobuf-java-util", version.ref = "protobuf" }
98+
protobuf-kotlin = { module = "com.google.protobuf:protobuf-kotlin", version.ref = "protobuf" }
99+
grpc-stub = { module = "io.grpc:grpc-stub", version.ref = "grpc" }
100+
grpc-util = { module = "io.grpc:grpc-util", version.ref = "grpc" }
101+
grpc-netty = { module = "io.grpc:grpc-netty", version.ref = "grpc" }
102+
grpc-protobuf = { module = "io.grpc:grpc-protobuf", version.ref = "grpc" }
103+
grpc-kotlin-stub = { module = "io.grpc:grpc-protobuf", version.ref = "grpc-kotlin" }
104+
grpc-protoc-gen-java = { module = "io.grpc:protoc-gen-grpc-java", version.ref = "grpc" }
105+
grpc-protoc-gen-kotlin = { module = "io.grpc:protoc-gen-grpc-kotlin", version.ref = "grpc-kotlin" }
106+
90107
# other
91108
kotlin-logging = { module = "io.github.oshai:kotlin-logging", version.ref = "kotlin-logging" }
92109
kotlin-logging-legacy = { module = "io.github.microutils:kotlin-logging", version.ref = "kotlin-logging" }
@@ -114,6 +131,7 @@ gradle-kotlin-dsl = { id = "org.gradle.kotlin.kotlin-dsl", version.ref = "gradle
114131
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
115132
gradle-plugin-publish = { id = "com.gradle.plugin-publish", version.ref = "gradle-plugin-publish" }
116133
shadow-jar = { id = "com.gradleup.shadow", version.ref = "shadow-jar" }
134+
protobuf = { id = "com.google.protobuf", version.ref = "protobuf-gradle" }
117135

118136
# gradle-conventions project
119137
conventions-common = { id = "conventions-common", version.ref = "kotlinx-rpc" }

0 commit comments

Comments
 (0)