Hello.
I have the bitbucket pipeline for android builds, but can't sign my apk.
- step:
name: Build android
image: android-30
script:
- echo $DEBUG_KEYSTORE_FILE_BASE64 | base64 -d > android-signing-keystore.jks
- ./gradlew -SIGNING_JKS_FILE=android-signing-keystore.jks
-KEYSTORE_PASSWORD=$SIGNING_KEYSTORE_PASSWORD
-KEY_ALIAS=$SIGNING_KEY_ALIAS
-KEY_PASSWORD=$SIGNING_KEY_PASSWORD
:app:assembleTestReleas
In build.gradle I've added:
signingConfigs {
release {
storeFile file(SIGNING_JKS_FILE)
storePassword KEYSTORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword SKEY_PASSWORD
}
}
But got the error:
Unknown command-line option '-K'.
How correctly sign android build via pipeline?
Try replacing
- ./gradlew ...
with
- > ./gradlew ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Oleksandr Sorochynskyi do you resolve the issue ? and how did you do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Minh TanYes, I've solved.
Looks like:
- echo $DEBUG_KEYSTORE_FILE_BASE64 | base64 -d > app/android-signing-keystore.jks
- ./gradlew -PKEYSTORE_FILE=android-signing-keystore.jks
-PKEYSTORE_PASSWORD=$SIGNING_KEYSTORE_PASSWORD
-PKEY_ALIAS=$SIGNING_KEY_ALIAS
-PKEY_PASSWORD=$SIGNING_KEY_PASSWORD
:app:assemble"$BITBUCKET_BRANCH"Release
And variables have names:
DEBUG_KEYSTORE_FILE_BASE64
SIGNING_KEYSTORE_PASSWORD
SIGNING_KEY_ALIAS
SIGNING_KEY_PASSWORD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And in a file build.gradle I've added:
signingConfigs {
release {
if (project.hasProperty('KEYSTORE_FILE')) {
storeFile file(KEYSTORE_FILE)
storePassword KEYSTORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.