[go: nahoru, domu]

Migrate ads-identifier to use Gradle Version Catalogs

- Ran development/versionCatalogMigrate.sh
- Manually updated imports in build.gradle files

Test: ./gradlew tasks
Change-Id: Idaa82845679c53a952beb76bc5bf96b453af5025
diff --git a/ads/ads-identifier-benchmark/build.gradle b/ads/ads-identifier-benchmark/build.gradle
index 95e55d2..57fdb60a 100644
--- a/ads/ads-identifier-benchmark/build.gradle
+++ b/ads/ads-identifier-benchmark/build.gradle
@@ -14,8 +14,6 @@
  * limitations under the License.
  */
 
-import static androidx.build.dependencies.DependenciesKt.*
-
 plugins {
     id("AndroidXPlugin")
     id("com.android.library")
@@ -29,11 +27,11 @@
     androidTestImplementation(project(":ads-identifier-provider"))
     androidTestImplementation(project(":ads-identifier-testing"))
     androidTestImplementation("androidx.work:work-runtime:2.2.0")
-    androidTestImplementation(JUNIT)
-    androidTestImplementation(TRUTH)
-    androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
-    androidTestImplementation(ANDROIDX_TEST_CORE)
-    androidTestImplementation(ANDROIDX_TEST_RUNNER)
-    androidTestImplementation(ANDROIDX_TEST_RULES)
-    androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
+    androidTestImplementation(libs.junit)
+    androidTestImplementation(libs.truth)
+    androidTestImplementation(libs.testExtJunit)
+    androidTestImplementation(libs.testCore)
+    androidTestImplementation(libs.testRunner)
+    androidTestImplementation(libs.testRules)
+    androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
 }
diff --git a/ads/ads-identifier-common/build.gradle b/ads/ads-identifier-common/build.gradle
index 264dff2..e238beb 100644
--- a/ads/ads-identifier-common/build.gradle
+++ b/ads/ads-identifier-common/build.gradle
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-import static androidx.build.dependencies.DependenciesKt.*
 import androidx.build.LibraryGroups
 import androidx.build.LibraryVersions
 import androidx.build.Publish
@@ -28,11 +27,11 @@
     api("androidx.annotation:annotation:1.1.0")
 
     testImplementation(project(":ads-identifier-testing"))
-    testImplementation(ANDROIDX_TEST_RUNNER)
-    testImplementation(JUNIT)
-    testImplementation(TRUTH)
-    testImplementation(MOCKITO_CORE)
-    testImplementation(ROBOLECTRIC)
+    testImplementation(libs.testRunner)
+    testImplementation(libs.junit)
+    testImplementation(libs.truth)
+    testImplementation(libs.mockitoCore)
+    testImplementation(libs.robolectric)
 }
 
 android {
diff --git a/ads/ads-identifier-provider/build.gradle b/ads/ads-identifier-provider/build.gradle
index f1039b5..bcba6a9 100644
--- a/ads/ads-identifier-provider/build.gradle
+++ b/ads/ads-identifier-provider/build.gradle
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-import static androidx.build.dependencies.DependenciesKt.*
 import androidx.build.LibraryGroups
 import androidx.build.LibraryVersions
 import androidx.build.Publish
@@ -27,19 +26,19 @@
 dependencies {
     api("androidx.annotation:annotation:1.1.0")
     implementation("androidx.core:core:1.1.0")
-    implementation(AUTO_VALUE_ANNOTATIONS)
-    annotationProcessor(AUTO_VALUE)
+    implementation(libs.autoValueAnnotations)
+    annotationProcessor(libs.autoValue)
 
     implementation(project(":ads-identifier-common"))
 
     androidTestImplementation(project(":ads-identifier-testing"))
-    androidTestImplementation(JUNIT)
-    androidTestImplementation(TRUTH)
-    androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
-    androidTestImplementation(ANDROIDX_TEST_CORE)
-    androidTestImplementation(ANDROIDX_TEST_RUNNER)
-    androidTestImplementation(ANDROIDX_TEST_RULES)
-    androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
+    androidTestImplementation(libs.junit)
+    androidTestImplementation(libs.truth)
+    androidTestImplementation(libs.testExtJunit)
+    androidTestImplementation(libs.testCore)
+    androidTestImplementation(libs.testRunner)
+    androidTestImplementation(libs.testRules)
+    androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
 }
 
 androidx {
diff --git a/ads/ads-identifier-provider/integration-tests/testapp/build.gradle b/ads/ads-identifier-provider/integration-tests/testapp/build.gradle
index fa4e4a6..c5bd590ca 100644
--- a/ads/ads-identifier-provider/integration-tests/testapp/build.gradle
+++ b/ads/ads-identifier-provider/integration-tests/testapp/build.gradle
@@ -13,9 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-import static androidx.build.dependencies.DependenciesKt.*
-
 plugins {
     id("AndroidXPlugin")
     id("com.android.application")
diff --git a/ads/ads-identifier-testing/build.gradle b/ads/ads-identifier-testing/build.gradle
index c54af2d..21e10e8 100644
--- a/ads/ads-identifier-testing/build.gradle
+++ b/ads/ads-identifier-testing/build.gradle
@@ -13,9 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-import static androidx.build.dependencies.DependenciesKt.*
-
 plugins {
     id("AndroidXPlugin")
     id("com.android.library")
@@ -24,7 +21,7 @@
 dependencies {
     implementation(project(":ads-identifier-common"))
     api("androidx.annotation:annotation:1.1.0")
-    api(MOCKITO_CORE, excludes.bytebuddy)
+    api(libs.mockitoCore, excludes.bytebuddy)
 }
 
 android {
diff --git a/ads/ads-identifier/build.gradle b/ads/ads-identifier/build.gradle
index c844d83..b89c7f9 100644
--- a/ads/ads-identifier/build.gradle
+++ b/ads/ads-identifier/build.gradle
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-import static androidx.build.dependencies.DependenciesKt.*
 import androidx.build.LibraryGroups
 import androidx.build.LibraryVersions
 import androidx.build.Publish
@@ -27,21 +26,21 @@
 dependencies {
     api("androidx.annotation:annotation:1.1.0")
     implementation("androidx.core:core:1.1.0")
-    implementation(AUTO_VALUE_ANNOTATIONS)
-    annotationProcessor(AUTO_VALUE)
-    api(GUAVA_LISTENABLE_FUTURE)
+    implementation(libs.autoValueAnnotations)
+    annotationProcessor(libs.autoValue)
+    api(libs.guavaListenableFuture)
     implementation("androidx.concurrent:concurrent-futures:1.0.0")
 
     implementation(project(":ads-identifier-common"))
 
     androidTestImplementation(project(":ads-identifier-testing"))
-    androidTestImplementation(JUNIT)
-    androidTestImplementation(TRUTH)
-    androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
-    androidTestImplementation(ANDROIDX_TEST_CORE)
-    androidTestImplementation(ANDROIDX_TEST_RUNNER)
-    androidTestImplementation(ANDROIDX_TEST_RULES)
-    androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
+    androidTestImplementation(libs.junit)
+    androidTestImplementation(libs.truth)
+    androidTestImplementation(libs.testExtJunit)
+    androidTestImplementation(libs.testCore)
+    androidTestImplementation(libs.testRunner)
+    androidTestImplementation(libs.testRules)
+    androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
 }
 
 androidx {
diff --git a/ads/ads-identifier/integration-tests/testapp/build.gradle b/ads/ads-identifier/integration-tests/testapp/build.gradle
index c0fd225..13723ea 100644
--- a/ads/ads-identifier/integration-tests/testapp/build.gradle
+++ b/ads/ads-identifier/integration-tests/testapp/build.gradle
@@ -14,8 +14,6 @@
  * limitations under the License.
  */
 
-import static androidx.build.dependencies.DependenciesKt.*
-
 plugins {
     id("AndroidXPlugin")
     id("com.android.application")
@@ -31,5 +29,5 @@
 dependencies {
     implementation(project(":ads-identifier"))
     implementation(project(":ads-identifier-common"))
-    implementation(GUAVA_ANDROID)
+    implementation(libs.guavaAndroid)
 }