1- def localProperties = new Properties ()
2- def localPropertiesFile = rootProject. file(' local.properties' )
3- if (localPropertiesFile. exists()) {
4- localPropertiesFile. withReader(' UTF-8' ) { reader ->
5- localProperties. load(reader)
6- }
1+ plugins {
2+ id ' com.android.application'
3+ id ' kotlin-android'
4+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+ id ' dev.flutter.flutter-gradle-plugin'
76}
87
9- def flutterRoot = localProperties. getProperty(' flutter.sdk' )
10- if (flutterRoot == null ) {
11- throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
12- }
13-
14- def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15- if (flutterVersionCode == null ) {
16- flutterVersionCode = ' 1'
17- }
188
19- def flutterVersionName = localProperties. getProperty(' flutter.versionName' )
20- if (flutterVersionName == null ) {
21- flutterVersionName = ' 1.0'
9+ def localProperties = new Properties ()
10+ def localPropertiesFile = rootProject. file(' local.properties' )
11+ if (localPropertiesFile. exists()) {
12+ localProperties. load(new FileInputStream (localPropertiesFile))
2213}
2314
24- apply plugin : ' com.android.application'
25- apply plugin : ' kotlin-android'
26- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27-
2815android {
2916 compileSdkVersion flutter. compileSdkVersion
17+ namespace = ' com.ionicfirebaseapp.getwidget_example'
3018
3119 compileOptions {
32- sourceCompatibility JavaVersion . VERSION_1_8
33- targetCompatibility JavaVersion . VERSION_1_8
20+ sourceCompatibility JavaVersion . VERSION_21
21+ targetCompatibility JavaVersion . VERSION_21
3422 }
3523
3624 kotlinOptions {
37- jvmTarget = ' 1.8 '
25+ jvmTarget = ' 21 '
3826 }
3927
4028 sourceSets {
@@ -48,8 +36,8 @@ android {
4836 // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
4937 minSdkVersion 21
5038 targetSdkVersion flutter. targetSdkVersion
51- versionCode flutterVersionCode . toInteger()
52- versionName flutterVersionName
39+ versionCode = flutter . versionCode
40+ versionName = flutter . versionName
5341 }
5442
5543 buildTypes {
@@ -64,7 +52,3 @@ android {
6452flutter {
6553 source ' ../..'
6654}
67-
68- dependencies {
69- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
70- }
0 commit comments