Skip to content

Commit

Permalink
Migrate SDKs to version catalog (#6389)
Browse files Browse the repository at this point in the history
Per [b/374135906](https://b.corp.google.com/issues/374135906),

This migrates all our SDKs to use the version catalog where appropriate.

This is **_ONLY_** done when the version we use in the version catalog
is the same version the SDK was using, so this should be a NOP change.
There may also be other dependencies that could be moved to the version
catalog, but research needs to be performed for that- which is out of
scope of this PR.

NO_RELEASE_CHANGE
  • Loading branch information
daymxn authored Oct 24, 2024
1 parent 7220e42 commit d96507b
Show file tree
Hide file tree
Showing 56 changed files with 235 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ dependencies {
api 'com.google.firebase:firebase-common-ktx:21.0.0'
api 'com.google.firebase:firebase-components:18.0.0'

implementation "androidx.test:core:$androidxTestCoreVersion"
implementation libs.androidx.test.core
implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-tasks:18.0.1'

testImplementation project(':appcheck:firebase-appcheck-playintegrity')
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.androidx.test.core
testImplementation libs.truth
testImplementation 'junit:junit:4.13-beta-2'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric

androidTestImplementation project(':firebase-storage')
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.13-beta-2'
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation libs.androidx.test.core
testImplementation 'androidx.test:rules:1.2.0'
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
testImplementation 'junit:junit:4.13-beta-2'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ dependencies {
implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-tasks:18.0.1'

testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation libs.androidx.test.core
testImplementation 'androidx.test:rules:1.2.0'
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'junit:junit:4.13.2'
testImplementation libs.androidx.test.core
testImplementation libs.truth
testImplementation libs.junit
testImplementation 'org.mockito:mockito-core:3.4.6'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}
20 changes: 10 additions & 10 deletions appcheck/firebase-appcheck/firebase-appcheck.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,40 +51,40 @@ android {
dependencies {
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'

api 'com.google.android.gms:play-services-tasks:18.1.0'
api libs.playservices.tasks
api 'com.google.firebase:firebase-annotations:16.2.0'
api "com.google.firebase:firebase-appcheck-interop:17.1.0"
api("com.google.firebase:firebase-common:21.0.0")
api("com.google.firebase:firebase-common-ktx:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")

implementation 'androidx.annotation:annotation:1.1.0'
implementation 'com.google.android.gms:play-services-base:18.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation libs.playservices.base
implementation libs.kotlin.stdlib

testImplementation(project(":integ-testing")){
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation libs.androidx.test.core
testImplementation 'androidx.test:rules:1.2.0'
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13-beta-2'
testImplementation 'org.mockito:mockito-core:5.2.0'
testImplementation libs.mockito.core
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric

androidTestImplementation project(':appcheck:firebase-appcheck')
androidTestImplementation(project(":integ-testing")){
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
androidTestImplementation "androidx.annotation:annotation:1.0.0"
androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
androidTestImplementation libs.androidx.test.core
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
androidTestImplementation 'org.mockito:mockito-inline:2.25.0'
Expand Down
8 changes: 4 additions & 4 deletions appcheck/firebase-appcheck/ktx/ktx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ dependencies {

implementation("com.google.firebase:firebase-components:18.0.0")

testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric

androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
androidTestImplementation libs.androidx.test.core
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'com.google.firebase:firebase-appcheck-interop:17.1.0'
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
}
13 changes: 0 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
// limitations under the License.

buildscript {
// TODO: remove once all sdks have migrated to version catalog
ext.kotlinVersion = libs.versions.kotlin.get()
ext.coroutinesVersion = libs.versions.coroutines.get()

repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -47,15 +43,6 @@ buildscript {
apply from: 'sdkProperties.gradle'
apply from: "gradle/errorProne.gradle"

ext {
// TODO: remove once all sdks have migrated to version catalog
googleTruthVersion = libs.versions.truth.get()
grpcVersion = libs.versions.grpc.get()
robolectricVersion = libs.versions.robolectric.get()
androidxTestCoreVersion = libs.versions.androidx.test.core.get()
androidxTestJUnitVersion = libs.versions.androidx.test.junit.get()
}

apply plugin: com.google.firebase.gradle.plugins.PublishingPlugin

apply plugin: com.google.firebase.gradle.plugins.ci.ContinuousIntegrationPlugin
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
implementation("com.google.auto.value:auto-value-annotations:1.8.1")
annotationProcessor("com.google.auto.value:auto-value:1.6.5")
implementation(kotlin("gradle-plugin", "1.8.22"))
implementation("org.json:json:20210307")
implementation(libs.org.json)

implementation("org.eclipse.aether:aether-api:1.0.0.v20140518")
implementation("org.eclipse.aether:aether-util:1.0.0.v20140518")
Expand All @@ -63,8 +63,8 @@ dependencies {
implementation(libs.android.gradlePlugin.builder.test.api)

testImplementation(libs.bundles.kotest)
testImplementation("junit:junit:4.13.2")
testImplementation("com.google.truth:truth:1.4.2")
testImplementation(libs.junit)
testImplementation(libs.truth)
testImplementation("commons-io:commons-io:2.15.1")
}

Expand Down
6 changes: 3 additions & 3 deletions encoders/firebase-decoders-json/firebase-decoders-json.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ dependencies {
implementation 'androidx.annotation:annotation:1.1.0'

testImplementation 'androidx.test:runner:1.2.0'
testImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.androidx.test.junit
testImplementation libs.truth
testImplementation 'junit:junit:4.13-rc-1'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}

tasks.withType(JavaCompile) {
Expand Down
4 changes: 2 additions & 2 deletions encoders/firebase-encoders-json/firebase-encoders-json.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ dependencies {
implementation 'androidx.annotation:annotation:1.1.0'

testImplementation 'androidx.test:runner:1.3.0'
testImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
testImplementation libs.androidx.test.junit
testImplementation "com.google.truth:truth:1.0.1"
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:3.3.3'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}

tasks.withType(JavaCompile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {

testImplementation 'com.google.guava:guava:31.0-jre'
testImplementation libs.protobuf.java.util
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
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 @@ -52,9 +52,9 @@ dependencies {
implementation 'androidx.annotation:annotation:1.1.0'

testImplementation 'androidx.test:runner:1.3.0'
testImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
testImplementation libs.androidx.test.junit
testImplementation 'com.google.truth:truth:1.0.1'
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:3.3.3'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}
2 changes: 1 addition & 1 deletion encoders/firebase-encoders/firebase-encoders.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ java {
dependencies {
implementation 'androidx.annotation:annotation:1.1.0'

testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
testImplementation 'junit:junit:4.13'
}

Expand Down
4 changes: 2 additions & 2 deletions firebase-abt/firebase-abt.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ dependencies {
exclude group: "com.google.firebase", module: "firebase-common"
}

implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22")
implementation(libs.kotlin.stdlib.jdk8)

testImplementation 'androidx.test:runner:1.2.0'
testImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'com.google.truth:truth:0.44'
testImplementation 'io.grpc:grpc-testing:1.12.0'
testImplementation 'junit:junit:4.13-beta-2'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric
}
15 changes: 7 additions & 8 deletions firebase-appdistribution-api/firebase-appdistribution-api.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,23 @@ dependencies {
api("com.google.firebase:firebase-components:18.0.0")

implementation 'androidx.annotation:annotation:1.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation libs.kotlin.stdlib

compileOnly 'com.google.auto.value:auto-value-annotations:1.6.5'

annotationProcessor 'com.google.auto.value:auto-value:1.6.5'

testImplementation project(':firebase-appdistribution-api')
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
testImplementation libs.androidx.test.core
testImplementation libs.truth
testImplementation libs.junit
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation 'org.mockito:mockito-inline:3.4.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric

androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
androidTestImplementation libs.androidx.test.core
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation "org.mockito:mockito-android:3.4.0"
}
8 changes: 4 additions & 4 deletions firebase-appdistribution-api/ktx/ktx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ dependencies {

implementation("com.google.firebase:firebase-components:18.0.0")

testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric

androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
androidTestImplementation libs.androidx.test.core
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
}
14 changes: 7 additions & 7 deletions firebase-appdistribution/firebase-appdistribution.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
implementation libs.javax.inject
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22")
implementation libs.kotlin.stdlib.jdk8

compileOnly 'com.google.auto.value:auto-value-annotations:1.6.5'

Expand All @@ -95,20 +95,20 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testImplementation "androidx.test:core:$androidxTestCoreVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'junit:junit:4.13.2'
testImplementation libs.androidx.test.core
testImplementation libs.truth
testImplementation libs.junit
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation libs.robolectric

androidTestImplementation(project(":integ-testing")){
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
androidTestImplementation "androidx.annotation:annotation:1.0.0"
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
androidTestImplementation 'org.mockito:mockito-inline:2.25.0'
Expand Down
4 changes: 2 additions & 2 deletions firebase-appdistribution/test-app/test-app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ dependencies {
// Shake detection
implementation 'com.squareup:seismic:1.0.3'
// Other dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation libs.kotlin.stdlib

// Beta flavor uses the full implementation
betaImplementation project(':firebase-appdistribution')

testImplementation 'junit:junit:4.13.2'
testImplementation libs.junit
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {

dependencies {
implementation("com.google.android.play:feature-delivery:2.0.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22")
implementation(libs.kotlin.stdlib.jdk8)
api("com.google.firebase:firebase-common:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")
}
4 changes: 2 additions & 2 deletions firebase-config-interop/firebase-config-interop.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ dependencies {
api("com.google.firebase:firebase-encoders-json:18.0.1")
api("com.google.firebase:firebase-encoders:17.0.0")

compileOnly("com.google.auto.value:auto-value-annotations:1.10.1")
compileOnly(libs.autovalue.annotations)

annotationProcessor("com.google.auto.value:auto-value:1.10.1")
annotationProcessor(libs.autovalue)
annotationProcessor(project(":encoders:firebase-encoders-processor"))

testImplementation(libs.junit)
Expand Down
2 changes: 1 addition & 1 deletion firebase-config/firebase-config.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ dependencies {
annotationProcessor("com.google.auto.value:auto-value:1.6.6")
javadocClasspath("com.google.auto.value:auto-value-annotations:1.6.6")
compileOnly("com.google.auto.value:auto-value-annotations:1.6.6")
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
compileOnly(libs.findbugs.jsr305)

// Testing
testImplementation(libs.junit)
Expand Down
Loading

0 comments on commit d96507b

Please sign in to comment.