Skip to content

Commit

Permalink
Merge branch 'fix-protoc-dependencies'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Jun 17, 2024
2 parents 55e2277 + ff5a5fc commit e19b1f3
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 10 deletions.
26 changes: 24 additions & 2 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,42 @@ 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)
}
}

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
Expand Down
30 changes: 29 additions & 1 deletion android/buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
48 changes: 48 additions & 0 deletions android/gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand Down
12 changes: 5 additions & 7 deletions android/lib/daemon-grpc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e19b1f3

Please sign in to comment.