Skip to content

Commit

Permalink
Use version catalog for proto deps
Browse files Browse the repository at this point in the history
  • Loading branch information
daymxn committed Oct 3, 2024
1 parent eec3c74 commit 111c0ff
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 26 deletions.
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ ext {
robolectricVersion = libs.versions.robolectric.get()
androidxTestCoreVersion = libs.versions.androidx.test.core.get()
androidxTestJUnitVersion = libs.versions.androidx.test.junit.get()
protocVersion = libs.versions.protoc.get()
javaliteVersion = libs.versions.javalite.get()
protobufJavaUtilVersion = libs.versions.protobufjavautil.get()
}

apply plugin: com.google.firebase.gradle.plugins.PublishingPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ java {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
}

Expand All @@ -47,7 +47,7 @@ dependencies {
testAnnotationProcessor project(':encoders:firebase-encoders-processor')

testImplementation 'com.google.guava:guava:31.0-jre'
testImplementation "com.google.protobuf:protobuf-java-util:$protobufJavaUtilVersion"
testImplementation libs.protobuf.java.util
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
testImplementation 'junit:junit:4.13.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
}

Expand Down
4 changes: 2 additions & 2 deletions encoders/protoc-gen-firebase-encoders/tests/tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
plugins {
firebaseEncoders {
Expand All @@ -51,7 +51,7 @@ dependencies {

testImplementation project(":encoders:firebase-encoders")
testImplementation project(":encoders:firebase-encoders-proto")
testImplementation "com.google.protobuf:protobuf-java:3.21.9"
testImplementation libs.protobuf.java
testImplementation "com.google.truth:truth:1.0.1"
testImplementation 'junit:junit:4.13.1'
}
2 changes: 1 addition & 1 deletion firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ dependencies {

androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
androidTestImplementation libs.protobuf.java.lite
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.28.1'
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.28.1'
androidTestImplementation 'org.mockito:mockito-core:3.4.3'
Expand Down
2 changes: 1 addition & 1 deletion firebase-crashlytics/firebase-crashlytics.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ dependencies {
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation("com.google.firebase:firebase-encoders-json:18.0.1")
androidTestImplementation("com.google.protobuf:protobuf-java:3.21.11")
androidTestImplementation(libs.protobuf.java)
androidTestImplementation(libs.truth)
androidTestImplementation("com.linkedin.dexmaker:dexmaker:2.28.3")
androidTestImplementation(libs.mockito.dexmaker)
Expand Down
4 changes: 2 additions & 2 deletions firebase-firestore/firebase-firestore.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
plugins {
grpc {
Expand Down Expand Up @@ -164,7 +164,7 @@ dependencies {
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"

testCompileOnly "com.google.protobuf:protobuf-java:$protocVersion"
testCompileOnly libs.protobuf.java

androidTestImplementation "androidx.annotation:annotation:1.1.0"
androidTestImplementation 'androidx.test:rules:1.5.0'
Expand Down
2 changes: 1 addition & 1 deletion firebase-firestore/ktx/ktx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ dependencies {
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"

testCompileOnly "com.google.protobuf:protobuf-java:$protocVersion"
testCompileOnly libs.protobuf.java
}
2 changes: 1 addition & 1 deletion firebase-inappmessaging/firebase-inappmessaging.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
plugins {
grpc {
Expand Down
2 changes: 1 addition & 1 deletion firebase-messaging/firebase-messaging.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protobuf {
protobuild project(path: ':encoders:protoc-gen-firebase-encoders', configuration: 'shadow')
}
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
plugins {
firebaseEncoders {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
generateProtoTasks {
all().each { task ->
Expand Down Expand Up @@ -121,7 +121,7 @@ dependencies {
testImplementation 'androidx.test:runner:1.5.1'
testImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
testImplementation 'com.github.tomakehurst:wiremock-standalone:2.26.3'
testImplementation "com.google.protobuf:protobuf-java-util:$protobufJavaUtilVersion"
testImplementation libs.protobuf.java.util
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
testImplementation 'junit:junit:4.13-beta-2'
Expand Down
6 changes: 3 additions & 3 deletions firebase-perf/firebase-perf.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ firebaseLibrary {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
generateProtoTasks {
all().each { task ->
Expand Down Expand Up @@ -104,7 +104,7 @@ dependencies {
implementation "androidx.annotation:annotation:1.1.0"
implementation "androidx.lifecycle:lifecycle-process:2.3.1"
implementation "com.google.android.gms:play-services-tasks:18.0.1"
implementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
implementation libs.protobuf.java.lite
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.annotation:annotation:1.7.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
Expand All @@ -130,7 +130,7 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testCompileOnly "com.google.protobuf:protobuf-java:3.21.9"
testCompileOnly libs.protobuf.java
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation "org.robolectric:robolectric:$robolectricVersion"
Expand Down
2 changes: 1 addition & 1 deletion firebase-perf/ktx/ktx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ dependencies {
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"

testCompileOnly "com.google.protobuf:protobuf-java:3.21.9"
testCompileOnly libs.protobuf.java
}
4 changes: 2 additions & 2 deletions protolite-well-known-types/protolite-well-known-types.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ firebaseLibrary {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
generateProtoTasks {
all().each { task ->
Expand Down Expand Up @@ -68,5 +68,5 @@ dependencies {
exclude group: "com.google.protobuf", module: "protobuf-java"
}

implementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
implementation libs.protobuf.java.lite
}
4 changes: 2 additions & 2 deletions transport/transport-backend-cct/transport-backend-cct.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
generateProtoTasks {
all().each { task ->
Expand Down Expand Up @@ -71,7 +71,7 @@ dependencies {

testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation 'com.github.tomakehurst:wiremock:3.0.1'
testImplementation "com.google.protobuf:protobuf-java-util:$protobufJavaUtilVersion"
testImplementation libs.protobuf.java.util
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
testImplementation 'junit:junit:4.13.1'
Expand Down
2 changes: 1 addition & 1 deletion transport/transport-runtime/transport-runtime.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
artifact = libs.protoc.get().toString()
}
plugins {
firebaseEncoders {
Expand Down

0 comments on commit 111c0ff

Please sign in to comment.