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

Fix enableVmCleanup not working for apps with product flavors. #32422

Closed
wants to merge 2 commits into from

Commits on Oct 18, 2021

  1. Fix applyAppPlugin being accessed too early in the React App Gradle P…

    …lugin
    
    Summary:
    While working on the NDK AGP Apis, I realized the the `applyAppPlugin` is accessed
    too early inside the Gradle plugin. Specifically is accessed once the plugin is applied,
    and the extension is not configured afterwards. This means that the extension is always set
    the default values.
    
    I'm fixing it moving it inside the `project.afterEvaluate` that was already need to access
    the variant informations.
    
    Changelog:
    [Internal] [Changed] - Fix applyAppPlugin being accessed too early in the React App Gradle Plugin
    
    Differential Revision: D31652984
    
    fbshipit-source-id: d8dddca1e0e3d3f8958b122350017f9d9e81d216
    cortinico authored and facebook-github-bot committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    d247d42 View commit details
    Browse the repository at this point in the history
  2. Fix enableVmCleanup not working for apps with product flavors.

    Summary:
    While working on the NDK AGP Api I realized that the `enableVmCleanup` function,
    that is supposed to cleanup the extra `.so` files from the final artifacts, is broken
    for apps with variants. Specifically say for a `liteDebug` app it tries to search for `.so` files inside:
    
    ```
    intermediates/stripped_native_libs/lite/debug/out/lib
    ```
    
    while the `.so` files are located inside:
    
    ```
    intermediates/stripped_native_libs/liteDebug/out/lib
    ```
    
    I've fixed changing the token of the path from `targetPath` to `variant.name`
    
    Changelog:
    [Android] [Fixed] - Fix enableVmCleanup not working for apps with product flavors
    
    Reviewed By: ShikaSD
    
    Differential Revision: D31654704
    
    fbshipit-source-id: 50998fd0f7384c153f36367f8abcc20746ab0945
    cortinico authored and facebook-github-bot committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    6ea08ec View commit details
    Browse the repository at this point in the history