File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
src/main/kotlin/kotlinx/rpc Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ public final class kotlinx/rpc/proto/ConstsKt {
160160 public static final field PROTO_SOURCE_SETS Ljava/lang/String;
161161}
162162
163+ public final class kotlinx/rpc/proto/KxrpcPluginJarKt {
164+ public static final fun getKxrpcProtocPluginJarPath (Lorg/gradle/api/Project;)Lorg/gradle/api/provider/Provider;
165+ }
166+
163167public abstract class kotlinx/rpc/proto/ProcessProtoFiles : org/gradle/api/tasks/Copy {
164168 public fun <init> ()V
165169}
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ internal open class DefaultGrpcExtension @Inject constructor(
256256 private fun createDefaultProtocPlugins () {
257257 protocPlugins.create(KXRPC ) {
258258 local {
259- javaJar(project.configurations.named( KXRPC_PLUGIN_JAR_CONFIGURATION ).map { it.singleFile.absolutePath } )
259+ javaJar(project.kxrpcProtocPluginJarPath )
260260 }
261261
262262 options.put(" debugOutput" , " protobuf-kxrpc-plugin.log" )
Original file line number Diff line number Diff line change @@ -6,6 +6,22 @@ package kotlinx.rpc.proto
66
77import kotlinx.rpc.LIBRARY_VERSION
88import org.gradle.api.Project
9+ import org.gradle.api.provider.Provider
10+
11+ /* *
12+ * Absolute path to the `kotlinx-rpc-protobuf-plugin` jar.
13+ *
14+ * Can be used to customise the java executable path:
15+ * ```kotlin
16+ * rpc.grpc.protocPlugins.kxrpc {
17+ * local {
18+ * javaJar(kxrpcProtocPluginJarPath, provider { "my-path-to-java" })
19+ * }
20+ * }
21+ * ```
22+ */
23+ public val Project .kxrpcProtocPluginJarPath: Provider <String >
24+ get() = project.configurations.named(KXRPC_PLUGIN_JAR_CONFIGURATION ).map { it.singleFile.absolutePath }
925
1026internal fun Project.configureKxRpcPluginJarConfiguration () {
1127 configurations.create(KXRPC_PLUGIN_JAR_CONFIGURATION )
You can’t perform that action at this time.
0 commit comments