Skip to content
Snippets Groups Projects
Commit 27f486c3 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '8-fix-signing-process' into 'master'

Resolve "Fix signing process"

Closes #8

See merge request android/hangman!4
parents 3935168a 4e81437a
No related branches found
No related tags found
1 merge request!4Resolve "Fix signing process"
Pipeline #685 canceled
...@@ -27,12 +27,11 @@ android:build: ...@@ -27,12 +27,11 @@ android:build:
- echo sdk.dir=$ANDROID_SDK_PATH >> android/local.properties - echo sdk.dir=$ANDROID_SDK_PATH >> android/local.properties
- echo flutter.buildMode=release >> android/local.properties - echo flutter.buildMode=release >> android/local.properties
# Android signing # Android signing
- ANDROID_KEYSTORE_PATH=my.keystore - echo "$ANDROID_KEYSTORE_FILE" | base64 -d > android/app/my.keystore
- echo $ANDROID_KEYSTORE_FILE | base64 -d > $ANDROID_KEYSTORE_PATH - echo storeFile=my.keystore > android/key.properties
- echo storePassword=$ANDROID_KEY_STORE_PASSWORD > android/key.properties - echo storePassword=$ANDROID_KEY_STORE_PASSWORD >> android/key.properties
- echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
- echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties - echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties
- echo storeFile=$ANDROID_KEYSTORE_PATH >> android/key.properties - echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
# build flutter app # build flutter app
- flutter build apk - flutter build apk
artifacts: artifacts:
......
...@@ -24,6 +24,12 @@ if (flutterVersionName == null) { ...@@ -24,6 +24,12 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android { android {
compileSdkVersion 29 compileSdkVersion 29
...@@ -40,11 +46,17 @@ android { ...@@ -40,11 +46,17 @@ android {
versionName flutterVersionName versionName flutterVersionName
} }
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. signingConfig signingConfigs.release
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
} }
} }
} }
......
...@@ -3,7 +3,7 @@ description: Hangman game, have fun with words and letters! ...@@ -3,7 +3,7 @@ description: Hangman game, have fun with words and letters!
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.1.0 version: 1.1.1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment