Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable r8 support in bazel #14741

Closed

Commits on Feb 7, 2022

  1. Enable r8 support in bazel

    This cl introduces R8 support in Bazel for proguarding and dexing.
    R8 is enabled by passing --experimental_enable_r8=true to the
    blaze build invocation and --proguard_top="//bzl/r8:proguard_compat"
    
    When enabled the build graph was changed from
     - jar -> proguard -> dex -> apk
    To
     - jar -> r8 -> apk
    
     I.e R8 takes care of proguarding and dexing.
    
    There are a few known limitations:
    
     - Only native multidex (Android version L+) is supported.
       All android_binary targets declare native_multidex so it does not
       make sense to implement legacy multidex with R8
     - Mobile-Install is not supported: mobile-install relies on how dexes
       are shard. R8 dexes the deploy jar in a single monolithic action
       which is cant be done incrementally (I don't think mobile-install is
       supported anymore)
     - Other features which are not implemented in bazel at the moment:
       e.g. dynamic delivery
     - proguard_compat needs to be available (not in this commit)
    
    ---
    Automatic squash commit from https://github.sc-corp.net/Snapchat/bazel/pull/145
    Cooled by mgalindo
    mgalindo-sc committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    965649f View commit details
    Browse the repository at this point in the history