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 plugin : ' kotlin-android'
26
- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27
-
28
8
android {
29
- compileSdkVersion 31
9
+ namespace ' com.mews.kiosk_mode_example'
10
+ compileSdk = flutter. compileSdkVersion
11
+ ndkVersion = ' 27.0.12077973'
12
+
13
+ compileOptions {
14
+ sourceCompatibility = JavaVersion . VERSION_21
15
+ targetCompatibility = JavaVersion . VERSION_21
16
+ }
30
17
31
- sourceSets {
32
- main . java . srcDirs + = ' src/main/kotlin '
18
+ kotlinOptions {
19
+ jvmTarget = JavaVersion . VERSION_21
33
20
}
34
21
35
22
defaultConfig {
36
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37
23
applicationId " com.mews.kiosk_mode_example"
38
24
minSdkVersion 23
39
- targetSdkVersion 30
40
- versionCode flutterVersionCode . toInteger()
41
- versionName flutterVersionName
25
+ targetSdk = flutter . targetSdkVersion
26
+ versionCode = flutter . versionCode
27
+ versionName = flutter . versionName
42
28
}
43
29
44
30
buildTypes {
45
31
release {
46
- // TODO: Add your own signing config for the release build.
47
- // Signing with the debug keys for now, so `flutter run --release` works.
48
32
signingConfig signingConfigs. debug
49
33
}
50
34
}
@@ -53,7 +37,3 @@ android {
53
37
flutter {
54
38
source ' ../..'
55
39
}
56
-
57
- dependencies {
58
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
59
- }
0 commit comments