I want to create aab
(bundle) via Fastlane
, but so far I was able to create only apk
, here is my lane
now, how to create aab?
lane :beta do
store_password = prompt(text: "Signing Store Password: ", secure_text: true)
key_password = prompt(text: "Alias Key Password: ", secure_text: true)
releaseFilePath = File.join(Dir.pwd, "..", "my-release-key.keystore")
gradle(task: 'clean')
gradle(
task: 'assemble',
build_type: 'Release',
print_command: false,
properties: {
"android.injected.signing.store.file" => releaseFilePath,
"android.injected.signing.store.password" => store_password,
"android.injected.signing.key.alias" => "my-key-alias",
"android.injected.signing.key.password" => key_password,
}
)
upload_to_play_store(
track: 'internal'
)
Using App Bundle Installer Another app that you can use to install an AAB file is called the App Bundle Installer, which, again, is available for download on the Google Play Store. Note that this is a free, ad supported app that is still in development.
To add App Distribution to your fastlane configuration, run the following command from the root of your Android project: If the command prompts you with an option, select Option 3: RubyGems.org.
Android App Bundle ( AAB) is a new upload format that includes all your app’s compiled code and resources, but defers APK generation and signing to Google Play using Google’s app serving model called Dynamic Delivery.
Specifies the Android file type (APK or AAB). Replaces apk_path (deprecated). Absolute path to the APK or AAB file you want to upload. If unspecified, fastlane determines the file's location from the lane in which the file was generated.
This is done by azure pipeline with a task which generate this file before build task using azure variables for passwords and alias AND azure pipeline secure file for jks file. After the task Gradle@2 with command ":app:bundleRelease", the aab generated is signed thanks to gradle signing config.
Changing task
from assemble
to bundle
, solved my issue!
Create signed Android App Bundle(aab) Release file, next sent to Google Play and automatically make a Release to production.
Run: fastlane build_aab --verbose
lane :build_aab do
gradle(task: 'clean')
gradle(
task: 'bundle',
build_type: 'Release',
print_command: true,
properties: {
"android.injected.signing.store.file" => "loca_file_system/unsigloenguerra.jks",
"android.injected.signing.store.password" => "Un$1986nWa_",
"android.injected.signing.key.alias" => "key0",
"android.injected.signing.key.password" => "Un$1986nWa_",
}
)
upload_to_play_store(
track:'production',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true)
end
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