Skip to content
Permalink
Browse files

conf key in build.gradle

  • Loading branch information...
namiwang committed Jan 11, 2018
1 parent 71f072f commit 3812fe2cda7646df43e87691d7631dc35fc57b04
Showing with 17 additions and 3 deletions.
  1. +4 −0 .gitignore
  2. +13 −3 android/app/build.gradle
@@ -1,11 +1,15 @@
.DS_Store

.atom/
.idea
.vscode/

.packages
.pub/
build/
ios/.generated/
packages
pubspec.lock
.flutter-plugins

/android/key.properties
@@ -15,6 +15,10 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
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

@@ -36,11 +40,17 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
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
signingConfig signingConfigs.release
}
}
}

0 comments on commit 3812fe2

Please sign in to comment.
You can’t perform that action at this time.