Skip to content

Bencodes/rules_android_app_bundles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rules_android_app_bundles

Bazel rules providing App Bundle Support to your Bazel Android projects. These rules are not meant to be a long term solutions, and will be deprecated once the rule_android Starlark migration is complete.

Progress for native app bundle support can be tracked here.

Usage

load("@rules_android_app_bundles//android:android_application.bzl", "android_application", "deployable_android_application")

android_application(
    # android_binary arguments
    name = "android_app",
    custom_package = "com.app.bundle.example",
    manifest = "src/main/java/com/app/bundle/example/AndroidManifest.xml",
    resource_files = glob(["src/main/java/com/app/bundle/example/res/**"]),
    deps = [":lib"],
    proguard_generate_mapping = True|False,
    progard_specs = [":proguard_spec"]|None
    # android_application app bundle arguments
    app_bundle_config_file = "//:bundle_config",
)

deployable_android_application(
    name = "install_android_app_aab",
    aab_target = ":android_app_aab",
)

The following targets will be created:

//:android_app_aab
//:android_app_deployable
//:android_app_module_aab
//:android_app_module_zip
//:android_app_univeral_apks
//:install_android_app_aab

To build the app bundle with Bazel:

bazel build //:android_app_aab

To get a universal APK generated from the app bundle:

bazel build //:android_app_univeral_apks

To install the generated app bundle on a device or emulator:

bazel run //:install_android_app_aab

Acknowledgements

These rules are forked out of the oppia-android project. Credit goes to Ben Henning and Alex Humesky for their work porting these rules out of the alpha rules_android Starlark implementation.