android_frameworks_base/api/gen_combined_removed_dex.sh
Anton Hansson a15427af11 Add genrule for combined-removed-dex
This is a module that aims to have the same contents as
out/soong/hiddenapi/combined-dex-api generated by hiddenapi_singleton.go
inside soong, but generated using a different method that does not
depend on the monolithic droidstubs rule in frameworks/base.

This is part of a series of changes to remove all the dependencies on
the monolithic droidstub rules, so that they can eventually be removed.

Bug: 169034951
Bug: 169395887
Test: m combined-dex-api
Change-Id: I2c4a76aa1d85ef44fc467474afacec20901aee13
2020-10-06 12:58:51 +00:00

12 lines
248 B
Bash
Executable File

#!/bin/bash
metalava_path="$1"
tmp_dir="$2"
shift 2
# Convert each removed.txt to the "dex format" equivalent, and print all output.
for f in "$@"; do
"$metalava_path" --no-banner "$f" --dex-api "${tmp_dir}/tmp"
cat "${tmp_dir}/tmp"
done