|
| 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 | + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. |
| 8 | + id "dev.flutter.flutter-gradle-plugin" |
| 9 | +} |
| 10 | + |
1 | 11 | def localProperties = new Properties()
|
2 |
| -def localPropertiesFile = rootProject.file('local.properties') |
| 12 | +def localPropertiesFile = rootProject.file("local.properties") |
3 | 13 | if (localPropertiesFile.exists()) {
|
4 |
| - localPropertiesFile.withReader('UTF-8') { reader -> |
| 14 | + localPropertiesFile.withReader("UTF-8") { reader -> |
5 | 15 | localProperties.load(reader)
|
6 | 16 | }
|
7 | 17 | }
|
8 | 18 |
|
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') |
| 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 |
| -apply plugin: 'com.android.application' |
25 |
| -// START: FlutterFire Configuration |
26 |
| -apply plugin: 'com.google.gms.google-services' |
27 |
| -// END: FlutterFire Configuration |
28 |
| -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
29 |
| - |
30 | 29 | android {
|
31 |
| - namespace "io.flutter.plugins.firebase.appcheck.example" |
32 |
| - |
33 |
| - compileSdk 34 |
| 30 | + namespace = "io.flutter.plugins.firebase.appcheck.example" |
| 31 | + compileSdk = flutter.compileSdkVersion |
| 32 | + ndkVersion = flutter.ndkVersion |
34 | 33 |
|
35 |
| - defaultConfig { |
36 |
| - applicationId "io.flutter.plugins.firebase.appcheck.example" |
37 |
| - minSdk 21 |
38 |
| - targetSdk 33 |
39 |
| - versionCode flutterVersionCode.toInteger() |
40 |
| - versionName flutterVersionName |
| 34 | + compileOptions { |
| 35 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 36 | + targetCompatibility = JavaVersion.VERSION_1_8 |
41 | 37 | }
|
42 | 38 |
|
43 |
| - buildFeatures { |
44 |
| - buildConfig true |
| 39 | + defaultConfig { |
| 40 | + applicationId = "io.flutter.plugins.firebase.appcheck.example" |
| 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 |
45 | 47 | }
|
46 | 48 |
|
47 | 49 | buildTypes {
|
48 | 50 | release {
|
49 | 51 | // TODO: Add your own signing config for the release build.
|
50 | 52 | // Signing with the debug keys for now, so `flutter run --release` works.
|
51 |
| - signingConfig signingConfigs.debug |
| 53 | + signingConfig = signingConfigs.debug |
52 | 54 | }
|
53 | 55 | }
|
54 | 56 | }
|
55 | 57 |
|
56 | 58 | flutter {
|
57 |
| - source '../..' |
| 59 | + source = "../.." |
58 | 60 | }
|
0 commit comments