I need to setup Azure a devops pipeline to build and deploy my native Android application to Google Play store or App Center as App Bundle.
I could figure out to deploy an apk but need help to deploy app bundle(.aab). Any help would be appreciated.
Change the apkFiles to **/*.aab
and pass the algorithms, -sigalg SHA256withRSA -digestalg SHA-256
as jarsignerArguments.
Like this:
- task: AndroidSigning@2
inputs:
apkFiles: '**/*.aab'
jarsign: true
jarsignerKeystoreFile: 'pathToYourKeystoreFile'
jarsignerKeystorePassword: '$(jarsignerKeystorePassword)'
jarsignerKeystoreAlias: '$(yourKeystoreAlias)'
jarsignerKeyPassword: '$(jarsignerKeyPassword)'
jarsignerArguments: '-sigalg SHA256withRSA -digestalg SHA-256'
zipalign: true
You can use the Google Play - Release Bundle task to deploy app bundle(.aab). After the Google play extension is installed in your azure devops organization. You can add Google Play - Release Bundle task in your pipeline and configure the bundleFile
field to the location of the generated .aab bundleFile. See below.
- task: ms-vsclient.google-play.google-play-release-bundle.GooglePlayReleaseBundle@3
displayName: 'Release functionParam.ps1 to internal'
inputs:
serviceConnection: googleServiceEndPoint
applicationId: applicationId
bundleFile: **/*.aab
Check out below tutorial to create a pipeline for your Android application
Build, test, and deploy Android apps
Update:
You can sign aab bundle using jarsigner
command in azure pipeline. You might need to use download secure file task to use your keystore_file if you upload it to secure file. For example run below jarsigner command in a powershell task:
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore my_keystor_file.keystore -storepass 'super_secret_keystore_pass' -keypass 'super_secret_alias_password' my-app-bundle.aab myKeyStoreAlias
See this thread for more information.
You can also use Xamarin.Android build task. And pass below arguements in Additional arguments for the build to package and sign the App Bundle:
-restore -t:SignAndroidPackage -p:AndroidPackageFormat=aab -p:AndroidKeyStore=True -p:AndroidSigningKeyStore=$(keystore.secureFilePath) -p:AndroidSigningStorePass=$(KeystorePassword) -p:AndroidSigningKeyAlias=$(KeystoreAlias) -p:AndroidSigningKeyPass=$(KeystorePassword)
See here for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With