|
1 | | -def localProperties = new Properties() |
2 | | -def localPropertiesFile = rootProject.file('local.properties') |
3 | | -if (localPropertiesFile.exists()) { |
4 | | - localPropertiesFile.withReader('UTF-8') { reader -> |
5 | | - localProperties.load(reader) |
6 | | - } |
7 | | -} |
8 | | - |
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') |
15 | | -if (flutterVersionCode == null) { |
16 | | - flutterVersionCode = '1' |
17 | | -} |
18 | | - |
19 | | -def flutterVersionName = localProperties.getProperty('flutter.versionName') |
20 | | -if (flutterVersionName == null) { |
21 | | - flutterVersionName = '1.0' |
| 1 | +plugins { |
| 2 | + id "com.android.application" |
| 3 | + id "kotlin-android" |
| 4 | + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. |
| 5 | + id "dev.flutter.flutter-gradle-plugin" |
22 | 6 | } |
23 | 7 |
|
24 | | -apply plugin: 'com.android.application' |
25 | | -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
26 | | - |
27 | 8 | android { |
28 | 9 | namespace 'com.ryanheise.just_waveform_example' |
29 | | - compileSdkVersion 33 |
| 10 | + compileSdk flutter.compileSdkVersion |
30 | 11 |
|
31 | 12 | compileOptions { |
32 | | - sourceCompatibility JavaVersion.VERSION_1_8 |
33 | | - targetCompatibility JavaVersion.VERSION_1_8 |
| 13 | + sourceCompatibility = JavaVersion.VERSION_11 |
| 14 | + targetCompatibility = JavaVersion.VERSION_11 |
34 | 15 | } |
35 | 16 |
|
36 | 17 | defaultConfig { |
37 | 18 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
38 | 19 | applicationId "com.ryanheise.just_waveform_example" |
39 | | - minSdkVersion 16 |
40 | | - targetSdkVersion 31 |
41 | | - versionCode flutterVersionCode.toInteger() |
42 | | - versionName flutterVersionName |
| 20 | + minSdk flutter.minSdkVersion |
| 21 | + targetSdk flutter.targetSdkVersion |
| 22 | + versionCode flutter.versionCode |
| 23 | + versionName flutter.versionName |
43 | 24 | } |
44 | 25 |
|
45 | 26 | buildTypes { |
|
0 commit comments