File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed
export_generators/ide-gradle Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -1985,6 +1985,7 @@ DETEKT_VERSION=1.23.7
19851985_KOTLIN_SEM= \
19861986 ${_WITH_KOTLIN_SEM} \
19871987 ${_KOTLIN_VERSION_SEM} \
1988+ ${_WITH_KOTLIN_GRPC_SEM} \
19881989 ${_WITH_KOTLINC_PLUGIN_ALLOPEN_SEM} \
19891990 ${_WITH_KOTLINC_PLUGIN_LOMBOK_SEM} \
19901991 ${_WITH_KOTLINC_PLUGIN_NOARG_SEM} \
Original file line number Diff line number Diff line change @@ -199,12 +199,14 @@ macro _ADD_SEM_PROP_IF_NON_EMPTY(Prop, Args...) {
199199}
200200
201201# tag:proto tag:java-specific
202+ _WITH_KOTLIN_GRPC_SEM=
202203macro WITH_KOTLIN_GRPC() {
203204 ENABLE(KOTLIN_PROTO)
204205 PEERDIR(build/platform/java/kotlin_grpc)
205- SET_APPEND(JAVA_PROTO_ARGS ${env:"JAVA_HOME=${JDK_RESOURCE}"} ${env:"KOTLIN_GRPC_JAR=${KOTLIN_GRPC_RESOURCE_GLOBAL}/grpc_kotlin/protoc-gen-grpc-kotlin-1.3.1 .jar"} --plugin=protoc-gen-kotlin_grpc=${KOTLIN_GRPC_RESOURCE_GLOBAL}/grpc_kotlin/grpc_kotlin --kotlin_grpc_out=$ARCADIA_BUILD_ROOT/java_out)
206- SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS contrib/java/io/grpc/grpc-kotlin-stub/1.3.1 )
206+ SET_APPEND(JAVA_PROTO_ARGS ${env:"JAVA_HOME=${JDK_RESOURCE}"} ${env:"KOTLIN_GRPC_JAR=${KOTLIN_GRPC_RESOURCE_GLOBAL}/grpc_kotlin/protoc-gen-grpc-kotlin-${KOTLIN_GRPC_VERSION} .jar"} --plugin=protoc-gen-kotlin_grpc=${KOTLIN_GRPC_RESOURCE_GLOBAL}/grpc_kotlin/grpc_kotlin --kotlin_grpc_out=$ARCADIA_BUILD_ROOT/java_out)
207+ SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS contrib/java/io/grpc/grpc-kotlin-stub/$KOTLIN_GRPC_VERSION )
207208 SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS contrib/java/com/google/protobuf/protobuf-kotlin/${JAVA_PROTO_RUNTIME_VERSION})
209+ SET(_WITH_KOTLIN_GRPC_SEM && proto_kotlin_grpc && proto_kotlin_grpc_version ${KOTLIN_GRPC_VERSION})
208210}
209211
210212
@@ -477,6 +479,7 @@ JAVA_PROTO_COMPILER_VERSION = 3.25.3
477479JAVA_PROTO_RUNTIME_VERSION = 3.25.3
478480JAVA_PROTO_COMMON_VERSION = 2.9.0
479481JAVA_GRPC_VERSION = 1.51.0
482+ KOTLIN_GRPC_VERSION = 1.3.1
480483JAVA_NETTY_NETTY_VERSION = 4.1.79.Final
481484KOTLIN_PROTO=no
482485KOTLIN_PROTO_PEERS=
Original file line number Diff line number Diff line change @@ -106,17 +106,30 @@ protobuf {
106106 // Download from repositories
107107 artifact = "com.google.protobuf:protoc:{% - if target .proto_compiler_version -%} {{ target.proto_compiler_version }}{% - else -%} 3.22.5{% - endif -%} "
108108 }
109- {% if target .proto_grpc is defined -%}
109+ {% if target .proto_grpc -%}
110110 plugins {
111111 id("grpc") {
112112 artifact = "io.grpc:protoc-gen-grpc-java:{% - if target .proto_grpc_version -%} {{ target.proto_grpc_version }}{% - else -%} 1.45.0{% - endif -%} "
113113 }
114+ {% - if target .proto_kotlin_grpc %}
115+ id("grpckt") {
116+ artifact = "io.grpc:protoc-gen-grpc-kotlin:{% - if target .proto_kotlin_grpc_version -%} {{ target.proto_kotlin_grpc_version }}{% - else -%} 1.3.1{% - endif -%} :jdk8@jar"
117+ }
118+ {% endif -%}
114119 }
115120 generateProtoTasks {
116121 all().forEach {
117122 it.plugins {
118123 id("grpc")
124+ {% - if target .proto_kotlin_grpc %}
125+ id("grpckt")
126+ {% endif -%}
127+ }
128+ {% - if target .proto_kotlin_grpc %}
129+ it.builtins {
130+ create("kotlin")
119131 }
132+ {% endif -%}
120133 }
121134 }
122135{% - endif %}
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ proto_common_version="str"
4343
4444proto_grpc =" flag"
4545proto_grpc_version =" str"
46+ proto_kotlin_grpc =" flag"
47+ proto_kotlin_grpc_version =" str"
4648
4749kotlin_version =" str"
4850with_kotlin =" flag"
You can’t perform that action at this time.
0 commit comments