diff options
author | Anton Hansson <hansson@google.com> | 2020-10-02 18:21:14 +0100 |
---|---|---|
committer | Anton Hansson <hansson@google.com> | 2020-10-06 12:58:51 +0000 |
commit | a15427af11efee1151efdc07213feef55c212e60 (patch) | |
tree | 1e97f5bf8cfd78f10f4a01fc79991be6ae7deaa0 /api | |
parent | c2ee800f20799ceef0ef3b88661123b9a987a288 (diff) |
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
Diffstat (limited to 'api')
-rw-r--r-- | api/Android.bp | 14 | ||||
-rwxr-xr-x | api/gen_combined_removed_dex.sh | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/api/Android.bp b/api/Android.bp index 546f15171285..ffc4a2146594 100644 --- a/api/Android.bp +++ b/api/Android.bp @@ -147,3 +147,17 @@ genrule { tools: ["metalava"], cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", } + +genrule { + name: "combined-removed-dex", + srcs: [ + ":frameworks-base-api-removed-merged.txt", + ":frameworks-base-api-system-removed-merged.txt", + ":android.car-stubs-docs{.removed-api.txt}", + ":android.car-system-stubs-docs{.removed-api.txt}", + ], + tool_files: ["gen_combined_removed_dex.sh"], + tools: ["metalava"], + out: ["combined-removed-dex.txt"], + cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)", +} diff --git a/api/gen_combined_removed_dex.sh b/api/gen_combined_removed_dex.sh new file mode 100755 index 000000000000..9225fe8dfe85 --- /dev/null +++ b/api/gen_combined_removed_dex.sh @@ -0,0 +1,11 @@ +#!/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 |