I am experimenting with GitLab's CI/CD and is figuring out how to generate a signed release APK.
I've read this article here.
and it suggested the following:
- ./gradlew assembleRelease
-Pandroid.injected.signing.store.file=$(pwd)/my.keystore
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD
-Pandroid.injected.signing.key.alias=$KEY_ALIAS
-Pandroid.injected.signing.key.password=$KEY_PASSWORD
and storing the variables at Gitlab CI/CD variables.
But everytime I run the pipeline it always results to this:
* What went wrong:
Execution failed for task ':app:packageRelease'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException:
com.android.ide.common.signing.KeytoolException: Failed to read key key0 from store "/tmp/Lp7GrQLJ/0/XXXXX/sample-android-project/keystore": Keystore was tampered with, or password was incorrect
Can anyone please guide me here? What could I possible be doing wrong?