|
1 | 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") |
| 2 | + id "com.android.application" |
| 3 | + id "kotlin-android" |
| 4 | + id "dev.flutter.flutter-gradle-plugin" |
| 5 | +} |
| 6 | + |
| 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' |
6 | 23 | } |
7 | 24 |
|
8 | 25 | android { |
9 | | - namespace = "plugins.cachet.audio_streamer_example" |
10 | | - compileSdk = flutter.compileSdkVersion |
11 | | - ndkVersion = "27.0.12077973" |
| 26 | + namespace 'plugins.cachet.audio_streamer_example' |
| 27 | + compileSdkVersion flutter.compileSdkVersion |
12 | 28 |
|
13 | | - compileOptions { |
14 | | - sourceCompatibility = JavaVersion.VERSION_17 |
15 | | - targetCompatibility = JavaVersion.VERSION_17 |
| 29 | + sourceSets { |
| 30 | + main.java.srcDirs += 'src/main/kotlin' |
16 | 31 | } |
17 | 32 |
|
18 | | - buildFeatures { |
19 | | - buildConfig = true |
| 33 | + compileOptions { |
| 34 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 35 | + targetCompatibility JavaVersion.VERSION_1_8 |
20 | 36 | } |
21 | | - |
| 37 | + |
22 | 38 | kotlinOptions { |
23 | | - jvmTarget = JavaVersion.VERSION_17.toString() |
| 39 | + jvmTarget = '1.8' |
| 40 | + } |
| 41 | + |
| 42 | + lint { |
| 43 | + disable 'InvalidPackage' |
24 | 44 | } |
25 | 45 |
|
26 | 46 | defaultConfig { |
27 | 47 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
28 | | - applicationId = "plugins.cachet.audio_streamer_example" |
29 | | - // You can update the following values to match your application needs. |
30 | | - // For more information, see: https://flutter.dev/to/review-gradle-config. |
31 | | - minSdk = flutter.minSdkVersion |
32 | | - targetSdk = flutter.targetSdkVersion |
33 | | - versionCode = flutter.versionCode |
34 | | - versionName = flutter.versionName |
| 48 | + applicationId "plugins.cachet.audio_streamer_example" |
| 49 | + minSdkVersion 28 |
| 50 | + targetSdkVersion flutter.targetSdkVersion |
| 51 | + versionCode flutterVersionCode.toInteger() |
| 52 | + versionName flutterVersionName |
35 | 53 | } |
36 | 54 |
|
37 | 55 | buildTypes { |
38 | 56 | release { |
39 | 57 | // TODO: Add your own signing config for the release build. |
40 | 58 | // Signing with the debug keys for now, so `flutter run --release` works. |
41 | | - signingConfig = signingConfigs.getByName("debug") |
| 59 | + signingConfig signingConfigs.debug |
42 | 60 | } |
43 | 61 | } |
44 | 62 | } |
45 | 63 |
|
46 | 64 | flutter { |
47 | | - source = "../.." |
| 65 | + source '../..' |
48 | 66 | } |
49 | 67 |
|
50 | | - |
51 | 68 | dependencies { |
52 | | - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.13.2' |
53 | | - androidTestImplementation 'androidx.test:runner:1.6.2' |
54 | | - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' |
| 69 | + testImplementation 'junit:junit:4.13.2' |
| 70 | + androidTestImplementation 'androidx.test:runner:1.5.2' |
| 71 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' |
55 | 72 | } |
0 commit comments