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