diff --git a/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/build.gradle b/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/build.gradle index 2c466ad..95f2c7d 100644 --- a/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/build.gradle +++ b/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,10 +22,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion flutter.compileSdkVersion @@ -62,7 +59,3 @@ android { flutter { source '../..' } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/build.gradle b/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/build.gradle index f797fc0..bc157bd 100644 --- a/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/build.gradle +++ b/very_good_flutter_plugin/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/build.gradle @@ -1,16 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath("com.android.tools.build:gradle:7.3.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } -} - allprojects { repositories { google()