1
+ import java.util.Properties
2
+ import java.io.FileInputStream
3
+
1
4
plugins {
2
5
id(" com.android.application" )
3
6
id(" kotlin-android" )
4
7
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5
8
id(" dev.flutter.flutter-gradle-plugin" )
6
9
}
7
10
11
+ val keystoreProperties = Properties ()
12
+ val keystorePropertiesFile = rootProject.file(" key.properties" )
13
+ if (keystorePropertiesFile.exists()) {
14
+ keystoreProperties.load(FileInputStream (keystorePropertiesFile))
15
+ }
16
+
8
17
android {
9
18
namespace = " com.tecdrop.weekday_counters"
10
19
compileSdk = flutter.compileSdkVersion
@@ -21,7 +30,6 @@ android {
21
30
}
22
31
23
32
defaultConfig {
24
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
25
33
applicationId = " com.tecdrop.weekday_counters"
26
34
// You can update the following values to match your application needs.
27
35
// For more information, see: https://flutter.dev/to/review-gradle-config.
@@ -31,11 +39,18 @@ android {
31
39
versionName = flutter.versionName
32
40
}
33
41
42
+ signingConfigs {
43
+ create(" release" ) {
44
+ keyAlias = keystoreProperties[" keyAlias" ] as String
45
+ keyPassword = keystoreProperties[" keyPassword" ] as String
46
+ storeFile = keystoreProperties[" storeFile" ]?.let { file(it) }
47
+ storePassword = keystoreProperties[" storePassword" ] as String
48
+ }
49
+ }
50
+
34
51
buildTypes {
35
52
release {
36
- // TODO: Add your own signing config for the release build.
37
- // Signing with the debug keys for now, so `flutter run --release` works.
38
- signingConfig = signingConfigs.getByName(" debug" )
53
+ signingConfig = signingConfigs.getByName(" release" )
39
54
}
40
55
}
41
56
}
0 commit comments