Skip to content

Commit 6b9a579

Browse files
committed
Move plugins to version catalog
1 parent b296be5 commit 6b9a579

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

AdaptiveUiCodelab/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616

1717
plugins {
18-
id("com.android.application")
19-
id("org.jetbrains.kotlin.android")
18+
alias(libs.plugins.android.application)
19+
alias(libs.plugins.kotlin.android)
2020
}
2121

2222
android {

AdaptiveUiCodelab/build.gradle.kts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,9 @@ buildscript {
1818
google()
1919
mavenCentral()
2020
}
21-
dependencies {
22-
classpath("com.android.tools.build:gradle:8.4.0")
23-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
24-
}
2521
}
2622

27-
subprojects {
28-
repositories {
29-
google()
30-
mavenCentral()
31-
}
23+
plugins {
24+
alias(libs.plugins.android.application) apply false
25+
alias(libs.plugins.kotlin.android) apply false
3226
}

AdaptiveUiCodelab/gradle/libs.versions.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[versions]
2+
androidGradlePlugin = "8.4.0"
23
composeBom = "2024.05.00"
34
coreKtx = "1.13.1"
45
activityCompose = "1.9.0"
56
espressoCore = "3.5.1"
67
junit = "4.13.2"
78
junitVersion = "1.1.5"
9+
kotlin = "1.9.23"
810
kotlinxCoroutinesAndroid = "1.8.0"
911
lifecycleViewmodelCompose = "2.7.0"
1012
lifecycleRuntimeKtx = "2.7.0"
@@ -29,3 +31,5 @@ junit = { module = "junit:junit", version.ref = "junit" }
2931
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }
3032

3133
[plugins]
34+
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
35+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

AdaptiveUiCodelab/settings.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
pluginManagement {
17+
repositories {
18+
google()
19+
mavenCentral()
20+
gradlePluginPortal()
21+
}
22+
}
23+
dependencyResolutionManagement {
24+
repositories {
25+
google()
26+
mavenCentral()
27+
}
28+
}
1629

1730
rootProject.name = "Reply"
1831
include(":app")

0 commit comments

Comments
 (0)