droiddoc accepts aidl files as inputs
droiddoc now accepts aidl files as inputs. This in turn allows us to
feed aidl files to java_sdk_library modules. This is required as some
java_sdk_library internally uses AIDL files and thus we need to specify
*.aidl files in the srcs property. Since the srcs property is internally
given to the droiddoc module as well as the runtime library, droiddoc
should be able to handle aidl files.
Bug: 77575606
Test: java_test.go
Change-Id: If7a8559a2a1d8ac1056b061d24e3a5ee5253453f
diff --git a/java/java_test.go b/java/java_test.go
index fe1c3d7..baf4b72 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -200,6 +200,7 @@
"bar-doc/a.java": nil,
"bar-doc/b.java": nil,
+ "bar-doc/IFoo.aidl": nil,
"bar-doc/known_oj_tags.txt": nil,
"external/doclava/templates-sdk": nil,
@@ -921,6 +922,7 @@
name: "bar-doc",
srcs: [
"bar-doc/*.java",
+ "bar-doc/IFoo.aidl",
],
exclude_srcs: [
"bar-doc/b.java"
@@ -943,6 +945,14 @@
if stubsJar != barDoc.Output.String() {
t.Errorf("expected stubs Jar [%q], got %q", stubsJar, barDoc.Output.String())
}
+ inputs := ctx.ModuleForTests("bar-doc", "android_common").Rule("javadoc").Inputs
+ var javaSrcs []string
+ for _, i := range inputs {
+ javaSrcs = append(javaSrcs, i.Base())
+ }
+ if len(javaSrcs) != 2 || javaSrcs[0] != "a.java" || javaSrcs[1] != "IFoo.java" {
+ t.Errorf("inputs of bar-doc must be []string{\"a.java\", \"IFoo.java\", but was %#v.", javaSrcs)
+ }
}
func TestJarGenrules(t *testing.T) {