diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-06-17 17:31:28 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-06-17 17:31:28 +0200 |
| commit | e19b1f35f5180542af65af2f9afcc32fb4efdfcb (patch) | |
| tree | 2d7a42d42bdec4f56a63043dd15f65ae72e18605 | |
| parent | 55e2277abc4092413f4af01e0c6587aee1138ff4 (diff) | |
| parent | ff5a5fc8e6deb8fb5680910026fc57923f4bdfa1 (diff) | |
| download | mullvadvpn-e19b1f35f5180542af65af2f9afcc32fb4efdfcb.tar.xz mullvadvpn-e19b1f35f5180542af65af2f9afcc32fb4efdfcb.zip | |
Merge branch 'fix-protoc-dependencies'
| -rw-r--r-- | android/build.gradle.kts | 26 | ||||
| -rw-r--r-- | android/buildSrc/src/main/kotlin/Dependencies.kt | 30 | ||||
| -rw-r--r-- | android/gradle/verification-metadata.xml | 48 | ||||
| -rw-r--r-- | android/lib/daemon-grpc/build.gradle.kts | 12 |
4 files changed, 106 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/gradle/verification-metadata.xml b/android/gradle/verification-metadata.xml index b3d62044fc..9495ad7033 100644 --- a/android/gradle/verification-metadata.xml +++ b/android/gradle/verification-metadata.xml @@ -2723,9 +2723,33 @@ </artifact> </component> <component group="com.google.protobuf" name="protoc" version="3.25.3"> + <artifact name="protoc-3.25.3-linux-aarch_64.exe"> + <sha256 value="5fa6313a4bbb8518ca6cfa7d641e4a5f8f5c98f699bdaf9a307d12368a5f82b8" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-3.25.3-linux-ppcle_64.exe"> + <sha256 value="698f06ddba9f63871b3a8a166aa38cb73903119054c6439561efd38175b467cb" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-3.25.3-linux-s390_64.exe"> + <sha256 value="791df454826ff569f211f1523a2149f7ebfb3bbc8a444c07fed56d441dcfc4c4" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-3.25.3-linux-x86_32.exe"> + <sha256 value="3daf066c0c06d36416a20b5a88e64549a4770b4afbb98639c6fe32e0011847a8" origin="Generated by Gradle"/> + </artifact> <artifact name="protoc-3.25.3-linux-x86_64.exe"> <sha256 value="e718992c5733ece01264f160c0890229770791e51c9612a2b34dc17f83ab3773" origin="Generated by Gradle"/> </artifact> + <artifact name="protoc-3.25.3-osx-aarch_64.exe"> + <sha256 value="af8c1bd4fb34ca9215e32a9911d2b5ccd275d120155c42e8d910dcfecc51362d" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-3.25.3-osx-x86_64.exe"> + <sha256 value="93a97e64ea4ea96a3ce826a2021bdc3e8cdc85d19bc95a18349e738b9d6725be" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-3.25.3-windows-x86_32.exe"> + <sha256 value="9c745fc021ee2e0d79f733ece7d6616adcbfb89c8e152a0db0170b33489b824c" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-3.25.3-windows-x86_64.exe"> + <sha256 value="dcbd81ead852b7823b74e3b764e5edbcf087c9d1e6f236f7b7ed4bcf102addab" origin="Generated by Gradle"/> + </artifact> </component> <component group="com.google.testing.platform" name="android-device-provider-local" version="0.0.9-alpha02"> <artifact name="android-device-provider-local-0.0.9-alpha02.jar"> @@ -3584,9 +3608,33 @@ </artifact> </component> <component group="io.grpc" name="protoc-gen-grpc-java" version="1.63.0"> + <artifact name="protoc-gen-grpc-java-1.63.0-linux-aarch_64.exe"> + <sha256 value="471427565ad82b3caac5e19dba2d15fb75b81042503ea32357630312d1f074b4" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-linux-ppcle_64.exe"> + <sha256 value="e74d6a334699a1c5f79da313eb33cd163ac869bd7355d6dd8d68672a3485bbe6" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-linux-s390_64.exe"> + <sha256 value="3acfb58f27fb42d35432cb58b93c98ec009167fbef6bc3a96236bbf52f87ab04" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-linux-x86_32.exe"> + <sha256 value="e54b92d15fd5052be5e76beae1cb09ed47a62b66dc12fa462cc85d27b6579abf" origin="Generated by Gradle"/> + </artifact> <artifact name="protoc-gen-grpc-java-1.63.0-linux-x86_64.exe"> <sha256 value="0e3e8db80ba1fbddeed97ea3220b52cfaa95764ff8bf00716df7322883ce47e8" origin="Generated by Gradle"/> </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-osx-aarch_64.exe"> + <sha256 value="28290117a2ee9ea60f50f94273ab139dc2b3be4b8f2a557bef7e6efefee5b363" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-osx-x86_64.exe"> + <sha256 value="28290117a2ee9ea60f50f94273ab139dc2b3be4b8f2a557bef7e6efefee5b363" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-windows-x86_32.exe"> + <sha256 value="878d1c1c0472a5fc0b3e2496bfc9bd6b77775570f7e0a28fb03b7359ae2f9a7e" origin="Generated by Gradle"/> + </artifact> + <artifact name="protoc-gen-grpc-java-1.63.0-windows-x86_64.exe"> + <sha256 value="c3e9aaefd825a6ea9a252e153e0998d7ef36a7b27c2156867a98c71edf9c18a1" origin="Generated by Gradle"/> + </artifact> </component> <component group="io.grpc" name="protoc-gen-grpc-kotlin" version="1.4.1"> <artifact name="protoc-gen-grpc-kotlin-1.4.1-jdk8.jar"> 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 { |
