First, you need to setup a keystore. Inside the keystore, you can put your private keys that you need to sign the app with.
To create a keystore and a key, you can use this command to create a RSA key with 2048 bits and a validity of 10000 days:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
You can add a config.json
file in the root of the project to easily update the texts from a spreadsheet and have a easy way to sign your Android app.
When setting up the config.json
, you can add a key
object for Android specific signing. If you use a relative path to the store, don't forget that it starts in the directory ${PROJECT_DIR}/platforms/android/
.
There are three settings that need to be set for the texts.
outputJson
- In our case, this should always besrc/js/texts.json
. It will overwrite the existing texts with the new ones it reads from Google Spreadsheets.sheetId
- The spreadsheet id.workheetIds
- An array of the worksheets to use from the Google Spreadsheet.
It is crucial that the spreadsheet is shared for everyone. Otherwise the gulp texts
task won't be able to download.
Here is a full example for a config.json
:
{
"key" : {
"store" : "../../my-release-key.keystore",
"storePassword" : "password-for-store",
"alias" : "alias_name",
"aliasPassword" : "password-for-key"
},
"outputJson" : "src/js/texts.json",
"sheetId" : "1TmeO6jsf53wrvAbGfN0UrQn7Ycn3G7lNMffVvuBbXTg",
"worksheetIds" : [
"0"
]
}