Skip to content

support AAB file output #12

@silbinarywolf

Description

@silbinarywolf

Example of how to do that here:
https://developer.android.com/build/building-cmdline#bundletool-build
Web Archive: http://web.archive.org/web/20241005113630/https://developer.android.com/build/building-cmdline#bundletool-build

tldr:

  • aapt2 link phase use protobuf format, ie. aapt2 link --proto-format --auto-add-overlay
  • package zip file differently:
    • manifest/AndroidManifest.xml <- AndroidManifest.xml no longer in root
    • dex/... <- will need to move classes.dex to dex/classes.dex
    • res/... <- stays the same
    • root/..., assets/..., and lib/... <- stays the same
    • resources.pb <- likely generated as part of aapt2 link --proto-format
  • pass zip to: bundletool build-bundle --modules=base.zip --output=mybundle.aab
  • use jarsigner for AAB instead of apksigner (only used for .apk files)

How should we approach this?

  • Make apk.installApk pass a flat to the internal function to say its an apk
  • Create new apk.installAab to internally work differently. So we can still build APKs.
  • Aesthetics (low priority)
    • Consider renaming apk.zig to just artifact.zig, so android.Apk becomes android.Artifact

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions