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