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
8
def localPropertiesFile = rootProject. file(' local.properties' )
3
9
if (localPropertiesFile. exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
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
15
def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15
16
if (flutterVersionCode == null ) {
16
17
flutterVersionCode = ' 1'
@@ -21,17 +22,31 @@ if (flutterVersionName == null) {
21
22
flutterVersionName = ' 1.0'
22
23
}
23
24
24
- apply plugin : ' com.android.application'
25
- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
26
-
27
25
android {
28
- compileSdkVersion 31
26
+ namespace " com.rmawatson.example"
27
+ compileSdkVersion flutter. compileSdkVersion
28
+ ndkVersion flutter. ndkVersion
29
+
30
+ compileOptions {
31
+ sourceCompatibility JavaVersion . VERSION_1_8
32
+ targetCompatibility JavaVersion . VERSION_1_8
33
+ }
34
+
35
+ kotlinOptions {
36
+ jvmTarget = ' 1.8'
37
+ }
38
+
39
+ sourceSets {
40
+ main. java. srcDirs + = ' src/main/kotlin'
41
+ }
29
42
30
43
defaultConfig {
31
44
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
32
- applicationId " com.example.flutterisolateexample"
33
- minSdkVersion 19
34
- targetSdkVersion 30
45
+ applicationId " com.rmawatson.example"
46
+ // You can update the following values to match your application needs.
47
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48
+ minSdkVersion flutter. minSdkVersion
49
+ targetSdkVersion flutter. targetSdkVersion
35
50
versionCode flutterVersionCode. toInteger()
36
51
versionName flutterVersionName
37
52
}
@@ -48,3 +63,5 @@ android {
48
63
flutter {
49
64
source ' ../..'
50
65
}
66
+
67
+ dependencies {}
0 commit comments