diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-06-17 15:50:55 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-06-17 15:50:55 +0200 |
| commit | c0d328c74e842d7cdacea5323fc3ec749f457037 (patch) | |
| tree | e294acc68f924a04a32c5b31fd8b7da9d375e857 /android | |
| parent | 55e2277abc4092413f4af01e0c6587aee1138ff4 (diff) | |
| download | mullvadvpn-c0d328c74e842d7cdacea5323fc3ec749f457037.tar.xz mullvadvpn-c0d328c74e842d7cdacea5323fc3ec749f457037.zip | |
Fix issues with protoc and protoc-java verification
Diffstat (limited to 'android')
| -rw-r--r-- | android/build.gradle.kts | 26 | ||||
| -rw-r--r-- | android/buildSrc/src/main/kotlin/Dependencies.kt | 30 | ||||
| -rw-r--r-- | android/lib/daemon-grpc/build.gradle.kts | 12 |
3 files changed, 58 insertions, 10 deletions
diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 787a0a2f68..978f7ef14b 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 b2417befba..a31859e5e5 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/lib/daemon-grpc/build.gradle.kts b/android/lib/daemon-grpc/build.gradle.kts index ed33aa4d09..ff5d75aa16 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 { |
