/ciappsigningexample

Android keystore file storage solutions in Circle CI and Travis CI

Primary LanguageKotlin

Where to Store Android KeyStore File in CI/CD Cycle?

This repo is created for Where to Store Android KeyStore File in CI/CD Cycle article in medium. You can take a look to get the story. Here are the storage solutions:

Build project in your local machine

  • Clone this repo and checkout the feature/encode-keystore branch:

    git clone https://github.com/farukcankaya/ciappsigningexample.git
    cd ciappsigningexample
    git fetch origin feature/encode-keystore
    git checkout feature/encode-keystore
    
  • Create keystore files

    We create two keystore files for debug and release build types. If you don't know how to create keystore, you create with following instructions here. We used following informations to create keystores:

    Debug

    • Alias: Debug
    • Password: 1234567
    • Keystore file name: debug.keystore.jks
    • Store password: 1234567

    Release

    • Alias: Prod
    • Password=12345678
    • Keystore file name: release.keystore.jks
    • Store password: 12345678
  • Create keystore.properties file in the project root(/ciappsigningexample)

    Create keystore.properties file and put the informations below to keystore.properties file.

    debugKeyAlias=Debug
    debugKeyPassword=1234567
    debugKeyStore=debug.keystore.jks
    debugStorePassword=1234567
    releaseKeyAlias=Prod
    releaseKeyPassword=12345678
    releaseKeyStore=release.keystore.jks
    releaseStorePassword=12345678
    
  • Finally build the project! You can build the project and create an APK with following command:

    ./gradlew clean assembleDebug It generates signed an APK named app-debug.apk in /ciappsigningexample/app/build/outputs/apk/debug/ directory.

Feel free to contribute

You can open an issue or send pull request about my faults.

License

Documentation (guides, references, and associated images) is licensed as Creative Commons Attribution-NonCommercial-ShareAlike CC BY-NC-SA. The full license can be found here, and the human-readable summary here.

Everything in this repository not covered above is licensed under the included MIT license.