Skip to content

Commit c36e017

Browse files
committed
Move plugins to version catalog
1 parent c714dc1 commit c36e017

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
@@ -19,15 +19,9 @@ buildscript {
1919
google()
2020
mavenCentral()
2121
}
22-
dependencies {
23-
classpath("com.android.tools.build:gradle:8.4.0")
24-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
25-
}
2622
}
2723

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

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"
@@ -31,3 +33,5 @@ junit = { module = "junit:junit", version.ref = "junit" }
3133
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }
3234

3335
[plugins]
36+
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
37+
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)