Hi all,
I’m trying to create an android build from a flutter project. During the Flutter-Build step, it attempts to sign the code and fails on “Keystore file not set for signing config release”. I’d rather use Sign Apk step to sign the build anyway, but Flutter-Build step already fails. I added a File Download step and still get the “keystore not set…” Error.
Anyone got ideas on what I’m misconfiguring? many Thanks.
Initializing gradle... 13.3s
Resolving dependencies... 40.3s
Running Gradle task 'assembleRelease'...
Calling mockable JAR artifact transform to create file: /Users/vagrant/.gradle/caches/transforms-1/files-1.1/android.jar/ced065ce0b40d5d5b8f059882c438a19/android.jar with input /usr/local/share/android-sdk/platforms/android-28/android.jar
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file not set for signing config release
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 50s
Running Gradle task 'assembleRelease'... 112.2s
Gradle task assembleRelease failed with exit code 1
Failed to build Android platform, error: exit status 1
My android/app/build.gradle is like this
buildTypes {
release {
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
}
}
signingConfigs {
release {
keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
storeFile file(System.getenv("HOME") + "/keystores/pong-release.jks")
storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")
}
debug {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
}
}
This is my workflow. I tried to insert “–nocodesign” into the android_additional_params to no avail : “cannot find target file “–nocodesign””
primary-android-only:
steps:
- activate-ssh-key@4.0.3:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4.0.17: {}
- script@1.1.5:
title: Do anything with Script step
- flutter-installer@0.11.0:
inputs:
- is_update: 'false'
- cache-pull@2.1.1: {}
- flutter-analyze@0.1.2:
inputs:
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
- file-downloader@1.0.1:
inputs:
- destination: file://$HOME/keystores/pong-release.keystore
- source: "$BITRISEIO_ANDROID_KEYSTORE_URL"
- flutter-build@0.12.0:
inputs:
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
- platform: android
- android_additional_params: "--release -t lib/app.dart"
- sign-apk@1.4.2: {}
- flutter-test@0.9.1: {}
- deploy-to-bitrise-io@1.9.2:
inputs:
- notify_email_list: "$EMAILS_TO_NOTIFY"
- cache-push@2.2.1: {}