Unverified Commit e8282edf authored by Bartek Pacia's avatar Bartek Pacia Committed by GitHub

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)
parent 9147a1c1
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()
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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment