1
+ plugins {
2
+ id " com.android.application"
3
+ id " kotlin-android"
4
+ id " dev.flutter.flutter-gradle-plugin"
5
+ }
6
+
7
+
1
8
def localProperties = new Properties ()
2
9
def localPropertiesFile = rootProject. file(' local.properties' )
3
10
if (localPropertiesFile. exists()) {
@@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
6
13
}
7
14
}
8
15
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
16
def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15
17
if (flutterVersionCode == null ) {
16
18
flutterVersionCode = ' 1'
@@ -21,26 +23,33 @@ if (flutterVersionName == null) {
21
23
flutterVersionName = ' 1.0'
22
24
}
23
25
24
- apply plugin : ' com.android.application'
25
- apply plugin : ' kotlin-android'
26
- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
26
+ def keystoreProperties = new Properties ()
27
+ def keystorePropertiesFile = rootProject. file(' key.properties' )
28
+ if (keystorePropertiesFile. exists()) {
29
+ keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
30
+ }
27
31
28
32
android {
29
- namespace " com.example.example"
30
-
31
- compileSdkVersion 34
33
+ compileSdk = 34
32
34
33
35
sourceSets {
34
36
main. java. srcDirs + = ' src/main/kotlin'
35
37
}
38
+ lintOptions {
39
+ disable ' InvalidPackage'
40
+ checkReleaseBuilds false
41
+ }
42
+ compileOptions {
43
+ sourceCompatibility = JavaVersion . VERSION_1_8
44
+ targetCompatibility = JavaVersion . VERSION_1_8
45
+ }
36
46
37
47
defaultConfig {
38
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
39
- applicationId " com.example.example"
40
- minSdkVersion 21
41
- targetSdkVersion 33
42
- versionCode flutterVersionCode. toInteger()
43
- versionName flutterVersionName
48
+ applicationId = " com.example.example"
49
+ minSdk = 24
50
+ targetSdk = 33
51
+ versionCode = flutterVersionCode. toInteger()
52
+ versionName = flutterVersionName
44
53
}
45
54
46
55
buildTypes {
@@ -50,12 +59,18 @@ android {
50
59
signingConfig signingConfigs. debug
51
60
}
52
61
}
62
+
63
+ buildFeatures {
64
+ viewBinding true
65
+ }
53
66
}
54
67
55
68
flutter {
56
69
source ' ../..'
57
70
}
58
71
59
72
dependencies {
60
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
73
+ implementation ' androidx.appcompat:appcompat:1.4.1'
74
+ implementation ' com.google.android.material:material:1.5.0'
61
75
}
76
+
0 commit comments