Skip to content

Commit 8e7f6a5

Browse files
authored
Use gradle/libs.versions.toml to specify the Android Gradle Plugin version (#6321)
1 parent 4a9d2d9 commit 8e7f6a5

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ dependencies {
5959

6060
implementation(libs.kotlinx.serialization.json)
6161
implementation("com.google.code.gson:gson:2.8.9")
62-
implementation("com.android.tools.build:gradle:8.2.1")
63-
implementation("com.android.tools.build:builder-test-api:8.2.1")
62+
implementation(libs.android.gradlePlugin.gradle)
63+
implementation(libs.android.gradlePlugin.builder.test.api)
6464

6565
testImplementation(libs.bundles.kotest)
6666
testImplementation("junit:junit:4.13.2")
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
[versions]
2-
androidGradlePlugin = "8.2.1"
3-
4-
[libraries]
5-
android-gradlePlugin-api = { group = "com.android.tools.build", name = "gradle-api", version.ref = "androidGradlePlugin" }
6-
71
[plugins]
82
spotless = { id = "com.diffplug.spotless", version = "7.0.0.BETA1" }

firebase-dataconnect/gradleplugin/plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plugins {
2323
java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } }
2424

2525
dependencies {
26-
compileOnly(libs.android.gradlePlugin.api)
26+
compileOnly(firebaseLibs.android.gradlePlugin.gradle.api)
2727
implementation(gradleKotlinDsl())
2828
}
2929

gradle/libs.versions.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# javalite, protoc and protobufjavautil versions should be in sync while updating and
33
# it needs to match the protobuf version which grpc has transitive dependency on, which
44
# needs to match the version of grpc that grpc-kotlin has a transitive dependency on.
5+
androidGradlePlugin = "8.2.1"
56
android-lint = "31.3.2"
67
autovalue = "1.10.1"
78
coroutines = "1.7.3"
@@ -24,6 +25,9 @@ androidx-test-junit="1.1.5"
2425
androidx-test-truth = "1.5.0"
2526

2627
[libraries]
28+
android-gradlePlugin-gradle = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
29+
android-gradlePlugin-gradle-api = { group = "com.android.tools.build", name = "gradle-api", version.ref = "androidGradlePlugin" }
30+
android-gradlePlugin-builder-test-api = { group = "com.android.tools.build", name = "builder-test-api", version.ref = "androidGradlePlugin" }
2731
android-lint = { module = "com.android.tools.lint:lint", version.ref = "android-lint" }
2832
android-lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "android-lint" }
2933
android-lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "android-lint" }

0 commit comments

Comments
 (0)