Release modifications
This commit is contained in:
parent
0a7393f149
commit
5b5b3f3585
4 changed files with 40 additions and 5 deletions
|
|
@ -14,6 +14,10 @@ if (flutterRoot == null) {
|
|||
apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||
def keystoreProperties = new Properties()
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
|
||||
|
|
@ -31,13 +35,26 @@ android {
|
|||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
signingConfigs {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
minifyEnabled true
|
||||
useProguard true
|
||||
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
flutter {
|
||||
|
|
|
|||
16
android/app/proguard-rules.pro
vendored
Normal file
16
android/app/proguard-rules.pro
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#Flutter Wrapper
|
||||
-keep class io.flutter.app.** { *; }
|
||||
-keep class io.flutter.plugin.** { *; }
|
||||
-keep class io.flutter.util.** { *; }
|
||||
-keep class io.flutter.view.** { *; }
|
||||
-keep class io.flutter.** { *; }
|
||||
-keep class io.flutter.plugins.** { *; }
|
||||
|
||||
# Basic ProGuard rules for Firebase Android SDK 2.0.0+
|
||||
-keep class com.firebase.** { *; }
|
||||
-keep class org.apache.** { *; }
|
||||
-keepnames class com.fasterxml.jackson.** { *; }
|
||||
-keepnames class javax.servlet.** { *; }
|
||||
-keepnames class org.ietf.jgss.** { *; }
|
||||
-dontwarn org.apache.**
|
||||
-dontwarn org.w3c.dom.**
|
||||
Loading…
Add table
Add a link
Reference in a new issue