diff options
author | Jiyong Park <jiyong@google.com> | 2018-05-23 18:42:04 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-05-23 18:42:04 +0900 |
commit | 1e440683e53602ec188913fc81e9d33c1af0f0a3 (patch) | |
tree | 4a9355d38732942d60f97e69717f93343604e77f /java/java_test.go | |
parent | 1a6e5c0c15f7981f37a114fa55d9b1dd29ed89ca (diff) |
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
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |