|
1 | 1 | def localProperties = new Properties() |
2 | | -def localPropertiesFile = rootProject.file('local.properties') |
| 2 | +def localPropertiesFile = rootProject.file("local.properties") |
3 | 3 | if (localPropertiesFile.exists()) { |
4 | | - localPropertiesFile.withReader('UTF-8') { reader -> |
| 4 | + localPropertiesFile.withReader("UTF-8") { reader -> |
5 | 5 | localProperties.load(reader) |
6 | 6 | } |
7 | 7 | } |
8 | 8 |
|
9 | | -def flutterRoot = localProperties.getProperty('flutter.sdk') |
| 9 | +def flutterRoot = localProperties.getProperty("flutter.sdk") |
10 | 10 | if (flutterRoot == null) { |
11 | 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") |
12 | 12 | } |
13 | 13 |
|
14 | | -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
| 14 | +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") |
15 | 15 | if (flutterVersionCode == null) { |
16 | | - flutterVersionCode = '1' |
| 16 | + flutterVersionCode = "1" |
17 | 17 | } |
18 | 18 |
|
19 | | -def flutterVersionName = localProperties.getProperty('flutter.versionName') |
| 19 | +def flutterVersionName = localProperties.getProperty("flutter.versionName") |
20 | 20 | if (flutterVersionName == null) { |
21 | | - flutterVersionName = '1.0' |
| 21 | + flutterVersionName = "1.0" |
22 | 22 | } |
23 | 23 |
|
24 | | -apply plugin: 'com.android.application' |
| 24 | +apply plugin: "com.android.application" |
25 | 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
26 | 26 |
|
27 | 27 | android { |
28 | | - compileSdkVersion 33 |
| 28 | + compileSdk 33 |
29 | 29 |
|
30 | | - namespace 'vn.hunghd.example' |
| 30 | + namespace "vn.hunghd.example" |
31 | 31 |
|
32 | 32 | defaultConfig { |
33 | | - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
34 | 33 | applicationId "vn.hunghd.example" |
35 | | - minSdkVersion 19 |
36 | | - targetSdkVersion 33 |
| 34 | + minSdk 19 |
| 35 | + targetSdk 33 |
37 | 36 | versionCode flutterVersionCode.toInteger() |
38 | 37 | versionName flutterVersionName |
39 | 38 | } |
40 | 39 |
|
41 | 40 | buildTypes { |
42 | 41 | release { |
43 | | - // TODO: Add your own signing config for the release build. |
44 | 42 | // Signing with the debug keys for now, so `flutter run --release` works. |
45 | 43 | signingConfig signingConfigs.debug |
46 | 44 | } |
47 | 45 | } |
48 | | - |
49 | | - lint { |
50 | | - disable 'InvalidPackage' |
51 | | - } |
52 | 46 | } |
53 | 47 |
|
54 | 48 | flutter { |
55 | | - source '../..' |
| 49 | + source "../.." |
56 | 50 | } |
0 commit comments