analyze_bcpf: Add --fix option
Add a --fix option that will cause the script to automatically fix the
issues that it finds. It uses the bpmodify tool to add values to the
bootclasspath_fragment's hidden_api properties.
This adds analyze_bcpf to bp2buildModuleDoNotConvertList as
analyze_bcpf depends on bpmodify which is a blueprint_go_binary which
is not yet supported by bazel.
Bug: 202154151
Test: m analyze_bcpf && analyze_bcpf --bcpf art-bootclasspath-fragment
m analyze_bcpf && analyze_bcpf --bcpf art-bootclasspath-fragment --fix
atest --host analyze_bcpf_test
Change-Id: I5ee52419b4829474f6dbeb47f86ab2aeb22b1382
diff --git a/scripts/hiddenapi/Android.bp b/scripts/hiddenapi/Android.bp
index a6a368d..07878f9 100644
--- a/scripts/hiddenapi/Android.bp
+++ b/scripts/hiddenapi/Android.bp
@@ -22,6 +22,8 @@
name: "analyze_bcpf",
main: "analyze_bcpf.py",
srcs: ["analyze_bcpf.py"],
+ // Make sure that the bpmodify tool is built.
+ data: [":bpmodify"],
libs: [
"signature_trie",
],
@@ -43,6 +45,8 @@
"analyze_bcpf.py",
"analyze_bcpf_test.py",
],
+ // Make sure that the bpmodify tool is built.
+ data: [":bpmodify"],
libs: [
"signature_trie",
],