Migrate FLAN to use Gradle Version Catalogs
- Ran development/versionCatalogMigrate.sh
- Manually updated imports in build.gradle files
Test: ./gradlew tasks
Change-Id: Id8ae42ce08ee1cb847837a320eb514aedea60886
diff --git a/activity/activity-compose/build.gradle b/activity/activity-compose/build.gradle
index 20451ba..5b3d1b8 100644
--- a/activity/activity-compose/build.gradle
+++ b/activity/activity-compose/build.gradle
@@ -15,12 +15,8 @@
*/
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.Publish
import androidx.build.RunApiTasks
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-
-import static androidx.build.dependencies.DependenciesKt.*
plugins {
id("AndroidXPlugin")
@@ -32,7 +28,7 @@
dependencies {
kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
- implementation(KOTLIN_STDLIB)
+ implementation(libs.kotlinStdlib)
api projectOrArtifact(":compose:runtime:runtime")
api projectOrArtifact(":compose:runtime:runtime-saveable")
api(projectOrArtifact(":activity:activity-ktx"))
@@ -42,10 +38,10 @@
androidTestImplementation projectOrArtifact(":compose:material:material")
androidTestImplementation projectOrArtifact(":compose:test-utils")
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
- androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ANDROIDX_TEST_EXT_KTX)
- androidTestImplementation(JUNIT)
- androidTestImplementation(TRUTH)
+ androidTestImplementation(libs.testRunner)
+ androidTestImplementation(libs.testExtJunitKtx)
+ androidTestImplementation(libs.junit)
+ androidTestImplementation(libs.truth)
}
androidx {
diff --git a/activity/activity-compose/integration-tests/activity-demos/build.gradle b/activity/activity-compose/integration-tests/activity-demos/build.gradle
index 82d727e..2928e80 100644
--- a/activity/activity-compose/integration-tests/activity-demos/build.gradle
+++ b/activity/activity-compose/integration-tests/activity-demos/build.gradle
@@ -14,11 +14,7 @@
* limitations under the License.
*/
-
import androidx.build.Publish
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-
-import static androidx.build.dependencies.DependenciesKt.getKOTLIN_STDLIB
plugins {
id("AndroidXPlugin")
@@ -29,7 +25,7 @@
dependencies {
kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
- implementation(KOTLIN_STDLIB)
+ implementation(libs.kotlinStdlib)
implementation projectOrArtifact(":activity:activity-compose")
implementation projectOrArtifact(":activity:activity-compose:activity-compose-samples")
}
diff --git a/activity/activity-compose/samples/build.gradle b/activity/activity-compose/samples/build.gradle
index 9c9f8ee..a02eac6 100644
--- a/activity/activity-compose/samples/build.gradle
+++ b/activity/activity-compose/samples/build.gradle
@@ -14,13 +14,8 @@
* limitations under the License.
*/
-
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.LibraryType
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-
-import static androidx.build.dependencies.DependenciesKt.*
plugins {
id("AndroidXPlugin")
@@ -31,7 +26,7 @@
dependencies {
kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
- implementation(KOTLIN_STDLIB)
+ implementation(libs.kotlinStdlib)
compileOnly projectOrArtifact(":annotation:annotation-sampled")
implementation projectOrArtifact(":compose:foundation:foundation")
diff --git a/activity/activity-ktx/build.gradle b/activity/activity-ktx/build.gradle
index 33394d1..a422909 100644
--- a/activity/activity-ktx/build.gradle
+++ b/activity/activity-ktx/build.gradle
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-import static androidx.build.dependencies.DependenciesKt.*
import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
import androidx.build.Publish
plugins {
@@ -37,15 +35,15 @@
api("androidx.savedstate:savedstate-ktx:1.1.0") {
because 'Mirror activity dependency graph for -ktx artifacts'
}
- api(KOTLIN_STDLIB)
+ api(libs.kotlinStdlib)
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
- androidTestImplementation(JUNIT)
- androidTestImplementation(TRUTH)
- androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
- androidTestImplementation(ANDROIDX_TEST_CORE)
- androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ANDROIDX_TEST_RULES)
+ androidTestImplementation(libs.junit)
+ androidTestImplementation(libs.truth)
+ androidTestImplementation(libs.testExtJunit)
+ androidTestImplementation(libs.testCore)
+ androidTestImplementation(libs.testRunner)
+ androidTestImplementation(libs.testRules)
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.activity", module: "activity"
})
diff --git a/activity/activity-lint/build.gradle b/activity/activity-lint/build.gradle
index 7e37c76..5e00727 100644
--- a/activity/activity-lint/build.gradle
+++ b/activity/activity-lint/build.gradle
@@ -17,22 +17,20 @@
import androidx.build.LibraryGroups
import androidx.build.LibraryType
-import static androidx.build.dependencies.DependenciesKt.*
-
plugins {
id("AndroidXPlugin")
id("kotlin")
}
dependencies {
- compileOnly(LINT_API_MIN)
- compileOnly(KOTLIN_STDLIB)
+ compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.kotlinStdlib)
- testImplementation(KOTLIN_STDLIB)
- testImplementation(LINT_CORE)
- testImplementation(LINT_TESTS)
- testImplementation(JUNIT)
- testImplementation(TRUTH)
+ testImplementation(libs.kotlinStdlib)
+ testImplementation(libs.androidLint)
+ testImplementation(libs.androidLintTests)
+ testImplementation(libs.junit)
+ testImplementation(libs.truth)
}
androidx {
diff --git a/activity/activity/build.gradle b/activity/activity/build.gradle
index fd9d259..a9d5187 100644
--- a/activity/activity/build.gradle
+++ b/activity/activity/build.gradle
@@ -1,8 +1,6 @@
import androidx.build.LibraryGroups
import androidx.build.Publish
-import static androidx.build.dependencies.DependenciesKt.*
-
plugins {
id("AndroidXPlugin")
id("com.android.library")
@@ -26,14 +24,14 @@
implementation("androidx.tracing:tracing:1.0.0")
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
- androidTestImplementation(KOTLIN_STDLIB)
- androidTestImplementation(LEAKCANARY)
- androidTestImplementation(LEAKCANARY_INSTRUMENTATION)
- androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
- androidTestImplementation(ANDROIDX_TEST_CORE)
- androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(TRUTH)
+ androidTestImplementation(libs.kotlinStdlib)
+ androidTestImplementation(libs.leakcanary)
+ androidTestImplementation(libs.leakcanaryInstrumentation)
+ androidTestImplementation(libs.testExtJunit)
+ androidTestImplementation(libs.testCore)
+ androidTestImplementation(libs.testRunner)
+ androidTestImplementation(libs.testRules)
+ androidTestImplementation(libs.truth)
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.activity", module: "activity"
})
diff --git a/activity/integration-tests/testapp/build.gradle b/activity/integration-tests/testapp/build.gradle
index 11e5101..780dd7f 100644
--- a/activity/integration-tests/testapp/build.gradle
+++ b/activity/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")
@@ -33,12 +31,12 @@
dependencies {
implementation(project(":activity:activity-ktx"))
implementation(projectOrArtifact(":lifecycle:lifecycle-runtime-ktx"))
- androidTestImplementation(KOTLIN_STDLIB)
- androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
- androidTestImplementation(ANDROIDX_TEST_CORE)
- androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(libs.kotlinStdlib)
+ androidTestImplementation(libs.testExtJunit)
+ androidTestImplementation(libs.testCore)
+ androidTestImplementation(libs.testRunner)
+ androidTestImplementation(libs.testRules)
+ androidTestImplementation(libs.espressoCore)
+ androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
}