summaryrefslogtreecommitdiff
path: root/java/hiddenapi_singleton_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/hiddenapi_singleton_test.go')
-rw-r--r--java/hiddenapi_singleton_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/java/hiddenapi_singleton_test.go b/java/hiddenapi_singleton_test.go
index df825bb3a..4670d0311 100644
--- a/java/hiddenapi_singleton_test.go
+++ b/java/hiddenapi_singleton_test.go
@@ -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) {