diff --git a/android/build.gradle.kts b/android/build.gradle.kts
index 787a0a2f6809..978f7ef14b7d 100644
--- a/android/build.gradle.kts
+++ b/android/build.gradle.kts
@@ -25,9 +25,30 @@ buildscript {
// Required for Gradle metadata verification to work properly, see:
// https://github.com/gradle/gradle/issues/19228
+ // Aapt plugin
classpath(Dependencies.Plugin.aaptLinux)
classpath(Dependencies.Plugin.aaptOsx)
classpath(Dependencies.Plugin.aaptWindows)
+ // ProtoC gen grpc java plugin
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaLinuxAarch_64)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaLinuxPpcle_64)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaLinuxS390_64)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaLinuxX86_32)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaLinuxX86_64)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaOsxAarch_64)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaOsxX86_64)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaWindowsX86_32)
+ classpath(Dependencies.Plugin.Protobuf.protocGenGrpcJavaWindowsX86_64)
+ // Protoc plugin
+ classpath(Dependencies.Plugin.Protobuf.protocLinuxAarch_64)
+ classpath(Dependencies.Plugin.Protobuf.protocLinuxPpcle_64)
+ classpath(Dependencies.Plugin.Protobuf.protocLinuxS390_64)
+ classpath(Dependencies.Plugin.Protobuf.protocLinuxX86_32)
+ classpath(Dependencies.Plugin.Protobuf.protocLinuxX86_64)
+ classpath(Dependencies.Plugin.Protobuf.protocOsxAarch_64)
+ classpath(Dependencies.Plugin.Protobuf.protocOsxX86_64)
+ classpath(Dependencies.Plugin.Protobuf.protocWindowsX86_32)
+ classpath(Dependencies.Plugin.Protobuf.protocWindowsX86_64)
}
}
@@ -35,10 +56,11 @@ val baselineFile = file("$rootDir/config/baseline.xml")
val configFile = files("$rootDir/config/detekt.yml")
val projectSource = file(projectDir)
-val detektExcludedPaths = listOf(
+val detektExcludedPaths =
+ listOf(
"**/build/**",
"**/mullvad_daemon/management_interface/**",
-)
+ )
detekt {
buildUponDefaultConfig = true
diff --git a/android/buildSrc/src/main/kotlin/Dependencies.kt b/android/buildSrc/src/main/kotlin/Dependencies.kt
index b2417befba98..a31859e5e5ef 100644
--- a/android/buildSrc/src/main/kotlin/Dependencies.kt
+++ b/android/buildSrc/src/main/kotlin/Dependencies.kt
@@ -151,6 +151,34 @@ object Dependencies {
const val playPublisher =
"com.github.triplet.gradle:play-publisher:${Versions.Plugin.playPublisher}"
const val playPublisherId = "com.github.triplet.play"
- const val protobufId = "com.google.protobuf"
+
+ object Protobuf {
+ const val protobufId = "com.google.protobuf"
+ const val protocGenGrpcJava =
+ "io.grpc:protoc-gen-grpc-java:${Versions.Grpc.grpcVersion}"
+ const val protoc = "com.google.protobuf:protoc:${Versions.Grpc.protobufVersion}"
+ const val protocGenGrpcKotlin =
+ "io.grpc:protoc-gen-grpc-kotlin:${Versions.Grpc.grpcKotlinVersion}:jdk8@jar"
+
+ const val protocGenGrpcJavaLinuxAarch_64 = "$protocGenGrpcJava:linux-aarch_64@exe"
+ const val protocGenGrpcJavaLinuxPpcle_64 = "$protocGenGrpcJava:linux-ppcle_64@exe"
+ const val protocGenGrpcJavaLinuxS390_64 = "$protocGenGrpcJava:linux-s390_64@exe"
+ const val protocGenGrpcJavaLinuxX86_32 = "$protocGenGrpcJava:linux-x86_32@exe"
+ const val protocGenGrpcJavaLinuxX86_64 = "$protocGenGrpcJava:linux-x86_64@exe"
+ const val protocGenGrpcJavaOsxAarch_64 = "$protocGenGrpcJava:osx-aarch_64@exe"
+ const val protocGenGrpcJavaOsxX86_64 = "$protocGenGrpcJava:osx-x86_64@exe"
+ const val protocGenGrpcJavaWindowsX86_32 = "$protocGenGrpcJava:windows-x86_32@exe"
+ const val protocGenGrpcJavaWindowsX86_64 = "$protocGenGrpcJava:windows-x86_64@exe"
+
+ const val protocLinuxAarch_64 = "$protoc:linux-aarch_64@exe"
+ const val protocLinuxPpcle_64 = "$protoc:linux-ppcle_64@exe"
+ const val protocLinuxS390_64 = "$protoc:linux-s390_64@exe"
+ const val protocLinuxX86_32 = "$protoc:linux-x86_32@exe"
+ const val protocLinuxX86_64 = "$protoc:linux-x86_64@exe"
+ const val protocOsxAarch_64 = "$protoc:osx-aarch_64@exe"
+ const val protocOsxX86_64 = "$protoc:osx-x86_64@exe"
+ const val protocWindowsX86_32 = "$protoc:windows-x86_32@exe"
+ const val protocWindowsX86_64 = "$protoc:windows-x86_64@exe"
+ }
}
}
diff --git a/android/gradle/verification-metadata.xml b/android/gradle/verification-metadata.xml
index b3d62044fca8..9495ad70338c 100644
--- a/android/gradle/verification-metadata.xml
+++ b/android/gradle/verification-metadata.xml
@@ -2723,9 +2723,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3584,9 +3608,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/lib/daemon-grpc/build.gradle.kts b/android/lib/daemon-grpc/build.gradle.kts
index ed33aa4d09db..ff5d75aa16dc 100644
--- a/android/lib/daemon-grpc/build.gradle.kts
+++ b/android/lib/daemon-grpc/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
id(Dependencies.Plugin.androidLibraryId)
id(Dependencies.Plugin.kotlinAndroidId)
id(Dependencies.Plugin.kotlinParcelizeId)
- id(Dependencies.Plugin.protobufId) version Versions.Plugin.protobuf
+ id(Dependencies.Plugin.Protobuf.protobufId) version Versions.Plugin.protobuf
id(Dependencies.Plugin.junit5) version Versions.Plugin.junit5
}
@@ -35,13 +35,11 @@ android {
}
protobuf {
- protoc { artifact = "com.google.protobuf:protoc:${Versions.Grpc.protobufVersion}" }
+ protoc { artifact = Dependencies.Plugin.Protobuf.protoc }
plugins {
- create("java") { artifact = "io.grpc:protoc-gen-grpc-java:${Versions.Grpc.grpcVersion}" }
- create("grpc") { artifact = "io.grpc:protoc-gen-grpc-java:${Versions.Grpc.grpcVersion}" }
- create("grpckt") {
- artifact = "io.grpc:protoc-gen-grpc-kotlin:${Versions.Grpc.grpcKotlinVersion}:jdk8@jar"
- }
+ create("java") { artifact = Dependencies.Plugin.Protobuf.protocGenGrpcJava }
+ create("grpc") { artifact = Dependencies.Plugin.Protobuf.protocGenGrpcJava }
+ create("grpckt") { artifact = Dependencies.Plugin.Protobuf.protocGenGrpcKotlin }
}
generateProtoTasks {
all().forEach {