|
1 | 1 | plugins {
|
2 | 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 | + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. |
3 | 8 | id "dev.flutter.flutter-gradle-plugin"
|
4 | 9 | }
|
5 | 10 |
|
6 | 11 | def localProperties = new Properties()
|
7 |
| -def localPropertiesFile = rootProject.file('local.properties') |
| 12 | +def localPropertiesFile = rootProject.file("local.properties") |
8 | 13 | if (localPropertiesFile.exists()) {
|
9 |
| - localPropertiesFile.withReader('UTF-8') { reader -> |
10 |
| - localProperties.load(reader) |
11 |
| - } |
| 14 | + localPropertiesFile.withReader("UTF-8") { reader -> |
| 15 | + localProperties.load(reader) |
| 16 | + } |
12 | 17 | }
|
13 | 18 |
|
14 |
| -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
| 19 | +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") |
15 | 20 | if (flutterVersionCode == null) {
|
16 |
| - flutterVersionCode = '1' |
| 21 | + flutterVersionCode = "1" |
17 | 22 | }
|
18 | 23 |
|
19 |
| -def flutterVersionName = localProperties.getProperty('flutter.versionName') |
| 24 | +def flutterVersionName = localProperties.getProperty("flutter.versionName") |
20 | 25 | if (flutterVersionName == null) {
|
21 |
| - flutterVersionName = '1.0' |
| 26 | + flutterVersionName = "1.0" |
22 | 27 | }
|
23 | 28 |
|
24 | 29 | android {
|
25 |
| - namespace 'io.flutter.plugins.firebasecoreexample' |
26 |
| - |
27 |
| - compileSdk flutter.compileSdkVersion |
28 |
| - |
29 |
| - defaultConfig { |
30 |
| - applicationId "io.flutter.plugins.firebasecoreexample" |
31 |
| - minSdkVersion flutter.minSdkVersion |
32 |
| - targetSdk flutter.targetSdkVersion |
33 |
| - versionCode flutterVersionCode.toInteger() |
34 |
| - versionName flutterVersionName |
35 |
| - } |
36 |
| - |
37 |
| - compileOptions { |
38 |
| - sourceCompatibility JavaVersion.VERSION_1_8 |
39 |
| - targetCompatibility JavaVersion.VERSION_1_8 |
40 |
| - } |
41 |
| - |
42 |
| - buildFeatures { |
43 |
| - buildConfig = true |
44 |
| - } |
45 |
| - |
46 |
| - buildTypes { |
47 |
| - release { |
48 |
| - signingConfig signingConfigs.debug |
| 30 | + namespace = "io.flutter.plugins.firebasecoreexample" |
| 31 | + compileSdk = flutter.compileSdkVersion |
| 32 | + ndkVersion = flutter.ndkVersion |
| 33 | + |
| 34 | + compileOptions { |
| 35 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 36 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 37 | + } |
| 38 | + |
| 39 | + defaultConfig { |
| 40 | + applicationId = "io.flutter.plugins.firebasecoreexample" |
| 41 | + // You can update the following values to match your application needs. |
| 42 | + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. |
| 43 | + minSdk = flutter.minSdkVersion |
| 44 | + targetSdk = flutter.targetSdkVersion |
| 45 | + versionCode = flutterVersionCode.toInteger() |
| 46 | + versionName = flutterVersionName |
| 47 | + } |
| 48 | + |
| 49 | + buildTypes { |
| 50 | + release { |
| 51 | + // TODO: Add your own signing config for the release build. |
| 52 | + // Signing with the debug keys for now, so `flutter run --release` works. |
| 53 | + signingConfig = signingConfigs.debug |
| 54 | + } |
49 | 55 | }
|
50 |
| - } |
51 | 56 | }
|
52 | 57 |
|
53 | 58 | flutter {
|
54 |
| - source '../..' |
| 59 | + source = "../.." |
55 | 60 | }
|
0 commit comments