Skip to content

Commit

Permalink
Add APK signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Simone Sestito committed Oct 22, 2018
1 parent e4240e2 commit 9dee003
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ build/
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties

# iOS/XCode related
**/ios/**/*.mode1v3
Expand Down
20 changes: 16 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,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

Expand All @@ -45,11 +49,19 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
}
}
}

Expand Down

0 comments on commit 9dee003

Please sign in to comment.