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- }
7- }
8-
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'
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"
176}
187
19- def flutterVersionName = localProperties. getProperty(' flutter.versionName' )
20- if (flutterVersionName == null ) {
21- flutterVersionName = ' 1.0'
22- }
23-
24- apply plugin : ' com.android.application'
25- apply plugin : ' kotlin-android'
26- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27-
288android {
29- compileSdkVersion 34
30- ndkVersion flutter. ndkVersion
9+ namespace = " com.instabug.flutter.example"
10+ compileSdk = flutter. compileSdkVersion
11+ ndkVersion = flutter. ndkVersion
3112
3213 compileOptions {
33- sourceCompatibility JavaVersion . VERSION_1_8
34- targetCompatibility JavaVersion . VERSION_1_8
14+ sourceCompatibility = JavaVersion . VERSION_1_8
15+ targetCompatibility = JavaVersion . VERSION_1_8
3516 }
3617
3718 kotlinOptions {
38- jvmTarget = ' 1.8'
39- }
40-
41- sourceSets {
42- main. java. srcDirs + = ' src/main/kotlin'
19+ jvmTarget = JavaVersion . VERSION_1_8
4320 }
4421
4522 defaultConfig {
4623 applicationId " com.instabug.flutter.example"
4724 minSdkVersion 21
4825 targetSdkVersion 34
49- versionCode flutterVersionCode . toInteger()
50- versionName flutterVersionName
26+ versionCode flutter . versionCode
27+ versionName flutter . versionName
5128 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
5229 multiDexEnabled true
5330 }
@@ -56,7 +33,7 @@ android {
5633 release {
5734 // TODO: Add your own signing config for the release build.
5835 // Signing with the debug keys for now, so `flutter run --release` works.
59- signingConfig signingConfigs. debug
36+ signingConfig = signingConfigs. debug
6037 }
6138 }
6239 namespace ' com.instabug.flutter.example'
@@ -71,7 +48,7 @@ flutter {
7148}
7249
7350dependencies {
74- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlin_version "
51+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20 "
7552 implementation ' com.android.support:multidex:1.0.3'
7653 implementation ' org.mockito:mockito-core:1.10.19'
7754 testImplementation ' junit:junit:4.12'
0 commit comments