stage('Build Mobile') {
steps {
withCredentials([
file(credentialsId: 'android-my-keystore', variable: 'android_my_keystore'),
string(credentialsId: 'android-my-keystore-alias', variable: 'android_my_keystore_alias'),
string(credentialsId: 'android-my-keystore-alias-password', variable: 'android_my_keystore_alias_password'),
string(credentialsId: 'android-my-keystore-store-password', variable: 'android_my_keystore_store_password')
]) {
sh '''
echo "key.store=${android_my_keystore}" > AndroidSigningProperties.txt
echo "key.alias=${android_my_keystore_alias}" >> AndroidSigningProperties.txt
echo "key.store.password=${android_my_keystore_store_password}" >> AndroidSigningProperties.txt
echo "key.alias.password=${android_my_keystore_alias_password}" >> AndroidSigningProperties.txt
'''
sh 'castle-engine package --target=android --verbose'
}
}
}