Skip to content

Commit 0ed9e85

Browse files
rvandermeulenmergify[bot]
authored andcommitted
Migrate AGP to the plugins DSL
1 parent 256e25f commit 0ed9e85

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
plugins {
6+
alias libs.plugins.android.application
67
alias libs.plugins.compose.compiler
78
alias libs.plugins.kotlin.android
89
}
910

10-
apply plugin: 'com.android.application'
1111
apply from: "$project.rootDir/automation/gradle/versionCode.gradle"
1212

1313
import com.android.build.api.variant.FilterConfiguration

build.gradle

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ buildscript {
2424
mavenCentral()
2525
}
2626
}
27-
28-
dependencies {
29-
classpath libs.tools.android.plugin
30-
}
3127
}
3228

3329
plugins {
30+
alias libs.plugins.android.application apply false
3431
alias libs.plugins.compose.compiler apply false
3532
alias libs.plugins.dependency.analysis
3633
alias libs.plugins.detekt

gradle/libs.versions.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
android-components = "128.0.20240522214846"
44

55
# AGP
6-
android-plugin = "8.4.1"
6+
android-gradle-plugin = "8.4.1"
77

88
# Kotlin
99
kotlin = "2.0.0"
@@ -50,9 +50,6 @@ okhttp = "4.12.0"
5050
okio = "3.4.0"
5151

5252
[libraries]
53-
# AGP
54-
tools-android-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "android-plugin" }
55-
5653
# Kotlin
5754
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
5855

@@ -184,6 +181,7 @@ mozilla-ui-tabcounter = { group = "org.mozilla.components", name = "ui-tabcounte
184181
mozilla-ui-widgets = { group = "org.mozilla.components", name = "ui-widgets", version.ref = "android-components" }
185182

186183
[plugins]
184+
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
187185
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
188186
dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependency-analysis" }
189187
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }

settings.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
pluginManagement {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
}
6+
}
7+
18
include ':app'
29

310
def log(message) {

0 commit comments

Comments
 (0)