Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create aab (bundle) via Fastlane?

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'
    )
like image 250
Lucky_girl Avatar asked Dec 03 '19 14:12

Lucky_girl


People also ask

How do I install an AAB bundle?

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.

How do I add app distribution to my Fastlane configuration?

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.

What is AaB (Android app bundle)?

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.

How does Fastlane work with apk files?

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.

How to generate an AAB file in azure pipeline?

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.


2 Answers

Changing task from assemble to bundle, solved my issue!

like image 86
Lucky_girl Avatar answered Nov 15 '22 07:11

Lucky_girl


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
like image 33
tanrobles Avatar answered Nov 15 '22 08:11

tanrobles