build.gradle (1984B)
1 plugins { 2 id "com.android.application" 3 // START: FlutterFire Configuration 4 id 'com.google.gms.google-services' 5 // END: FlutterFire Configuration 6 id "kotlin-android" 7 id "dev.flutter.flutter-gradle-plugin" 8 } 9 10 def localProperties = new Properties() 11 def localPropertiesFile = rootProject.file('local.properties') 12 if (localPropertiesFile.exists()) { 13 localPropertiesFile.withReader('UTF-8') { reader -> 14 localProperties.load(reader) 15 } 16 } 17 18 def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 19 if (flutterVersionCode == null) { 20 flutterVersionCode = '1' 21 } 22 23 def flutterVersionName = localProperties.getProperty('flutter.versionName') 24 if (flutterVersionName == null) { 25 flutterVersionName = '1.0' 26 } 27 28 android { 29 namespace "com.example.penny" 30 compileSdkVersion 34 31 ndkVersion flutter.ndkVersion 32 33 compileOptions { 34 sourceCompatibility JavaVersion.VERSION_1_8 35 targetCompatibility JavaVersion.VERSION_1_8 36 } 37 38 kotlinOptions { 39 jvmTarget = '1.8' 40 } 41 42 sourceSets { 43 main.java.srcDirs += 'src/main/kotlin' 44 } 45 46 defaultConfig { 47 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 48 applicationId "com.example.penny" 49 // You can update the following values to match your application needs. 50 // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 51 minSdkVersion 21 52 targetSdkVersion flutter.targetSdkVersion 53 versionCode flutterVersionCode.toInteger() 54 versionName flutterVersionName 55 } 56 57 buildTypes { 58 release { 59 // TODO: Add your own signing config for the release build. 60 // Signing with the debug keys for now, so `flutter run --release` works. 61 signingConfig signingConfigs.debug 62 } 63 } 64 } 65 66 flutter { 67 source '../..' 68 } 69 70 dependencies {}