Android: Land unused resources detector in repo

This unused resources finder is based on gradle's resource shrinking.
This cl lands it into the repo and creates a template for using it.

The output of the tool is an aapt2 config file with unused resources
marked as "remove".

This tool is copied (with heavy modification) from
https://android.googlesource.com/platform/tools/base/+/master/build-system/gradle-core/src/main/groovy/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java
(actually it's copied from the currently private source at HEAD, but this is the best opensource link I could find).

Bug: 1195015
Change-Id: I17a6439138796e472f7a624ed778fb598398e385
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2826352
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#872876}
GitOrigin-RevId: a9dd71a67ee0440e550e940547d3319cbb3209d5
1 file changed