From 1e440683e53602ec188913fc81e9d33c1af0f0a3 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Wed, 23 May 2018 18:42:04 +0900 Subject: 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 --- java/java_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index fe1c3d720..baf4b723b 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -200,6 +200,7 @@ func testContext(config android.Config, bp string, "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 @@ func TestDroiddoc(t *testing.T) { name: "bar-doc", srcs: [ "bar-doc/*.java", + "bar-doc/IFoo.aidl", ], exclude_srcs: [ "bar-doc/b.java" @@ -943,6 +945,14 @@ func TestDroiddoc(t *testing.T) { 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) { -- cgit v1.2.3-59-g8ed1b