diff options
| author | Albin <albin@mullvad.net> | 2025-07-15 15:36:44 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2025-07-15 15:36:44 +0200 |
| commit | 738dba4550bf09920d70b7cebda58ee9d081b462 (patch) | |
| tree | 3292fc58e0c35a9fa54dba7023d6b59f4936f540 /android/lib | |
| parent | a3ec4507f0e0dcd35e1940e897eb1d3a51151940 (diff) | |
| download | mullvadvpn-738dba4550bf09920d70b7cebda58ee9d081b462.tar.xz mullvadvpn-738dba4550bf09920d70b7cebda58ee9d081b462.zip | |
Support using system grpc plugin
This allows flexibility of plugin binary usage and
thereby enables builds using systems such as nix.
Diffstat (limited to 'android/lib')
| -rw-r--r-- | android/lib/daemon-grpc/build.gradle.kts | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/android/lib/daemon-grpc/build.gradle.kts b/android/lib/daemon-grpc/build.gradle.kts index d4a6d0e7a2..cadd126830 100644 --- a/android/lib/daemon-grpc/build.gradle.kts +++ b/android/lib/daemon-grpc/build.gradle.kts @@ -44,8 +44,21 @@ android { protobuf { protoc { artifact = libs.plugins.protobuf.protoc.get().toString() } plugins { - create("java") { artifact = libs.plugins.grpc.protoc.gen.grpc.java.get().toString() } - create("grpc") { artifact = libs.plugins.grpc.protoc.gen.grpc.java.get().toString() } + val grpcPluginPath = System.getenv("PROTOC_GEN_GRPC_JAVA_PLUGIN") + create("java") { + if (grpcPluginPath != null) { + path = grpcPluginPath + } else { + artifact = libs.plugins.grpc.protoc.gen.grpc.java.get().toString() + } + } + create("grpc") { + if (grpcPluginPath != null) { + path = grpcPluginPath + } else { + artifact = libs.plugins.grpc.protoc.gen.grpc.java.get().toString() + } + } create("grpckt") { artifact = libs.plugins.grpc.protoc.gen.grpc.kotlin.get().toString() } } generateProtoTasks { |
