Update Android app project template to apply Kotlin Gradle plugin declaratively (#139006)
This PR updates the app templates generated by `flutter create` to use declarative `plugins {}` syntax for applying the Kotlin Gradle Plugin.
I realized this is missing while writing [#9857.](https://github.com/flutter/website/pull/9857)
This commit is contained in:
@@ -1,16 +1,3 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '{{kotlinVersion}}'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// AGP version is set in settings.gradle.
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -2,5 +2,4 @@ package {{androidIdentifier}}
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
||||
class MainActivity: FlutterActivity()
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '{{kotlinVersion}}'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// AGP version is set in settings.gradle.
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -20,6 +20,7 @@ pluginManagement {
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "{{agpVersion}}" apply false
|
||||
id "org.jetbrains.kotlin.android" version "{{kotlinVersion}}" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
Reference in New Issue
Block a user