Allow explicitly specified additional annotations for hiddenapi
Adds the hiddenapi_additional_annotations to allow a library to list the libraries that provided additional hiddenapi related annotations for a library. Modifies merge_csv.py so it can process multiple zip files at the same time and uses that to merge the embedded .uau files from a module and those it depends upon. Bug: 180102243 Test: m droid Verified that hiddenapi files (both aggregated ones and for the individual modules) are not affected by this change. Change-Id: I796520021c7357398a9e2a09f1029e4a578b05b3
This commit is contained in:
@@ -82,6 +82,10 @@ func TestHiddenAPIIndexSingleton(t *testing.T) {
|
||||
name: "foo",
|
||||
srcs: ["a.java"],
|
||||
compile_dex: true,
|
||||
|
||||
hiddenapi_additional_annotations: [
|
||||
"foo-hiddenapi-annotations",
|
||||
],
|
||||
}
|
||||
|
||||
java_library {
|
||||
@@ -90,6 +94,12 @@ func TestHiddenAPIIndexSingleton(t *testing.T) {
|
||||
compile_dex: true,
|
||||
}
|
||||
|
||||
java_library {
|
||||
name: "foo-hiddenapi-annotations",
|
||||
srcs: ["a.java"],
|
||||
compile_dex: true,
|
||||
}
|
||||
|
||||
java_import {
|
||||
name: "foo",
|
||||
jars: ["a.jar"],
|
||||
@@ -112,6 +122,15 @@ func TestHiddenAPIIndexSingleton(t *testing.T) {
|
||||
.intermediates/foo/android_common/hiddenapi/index.csv
|
||||
`,
|
||||
indexRule)
|
||||
|
||||
// Make sure that the foo-hiddenapi-annotations.jar is included in the inputs to the rules that
|
||||
// creates the index.csv file.
|
||||
foo := ctx.ModuleForTests("foo", "android_common")
|
||||
indexParams := foo.Output("hiddenapi/index.csv")
|
||||
CheckHiddenAPIRuleInputs(t, `
|
||||
.intermediates/foo-hiddenapi-annotations/android_common/javac/foo-hiddenapi-annotations.jar
|
||||
.intermediates/foo/android_common/javac/foo.jar
|
||||
`, indexParams)
|
||||
}
|
||||
|
||||
func TestHiddenAPISingletonWithPrebuilt(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user