Add array type property flags, equivalent to args

The property args is currently a string, but represents a collection of
arguments to metalava/doclava. This has resulted in variables being used
rather than default modules to share arguments.

Test: go test java_tests
Bug: 145644363
Change-Id: I670235e8f1cf19bfe8909049c4765637d0accd47
This commit is contained in:
Liz Kammer
2020-07-06 09:12:57 -07:00
parent ed62b9cc2a
commit 585cac22d9
2 changed files with 84 additions and 27 deletions

View File

@@ -1097,7 +1097,7 @@ func TestDroiddoc(t *testing.T) {
],
proofread_file: "libcore-proofread.txt",
todo_file: "libcore-docs-todo.html",
args: "-offlinemode -title \"libcore\"",
flags: ["-offlinemode -title \"libcore\""],
}
`,
map[string][]byte{
@@ -1124,6 +1124,42 @@ func TestDroiddoc(t *testing.T) {
}
}
func TestDroiddocArgsAndFlagsCausesError(t *testing.T) {
testJavaError(t, "flags is set. Cannot set args", `
droiddoc_exported_dir {
name: "droiddoc-templates-sdk",
path: ".",
}
filegroup {
name: "bar-doc-aidl-srcs",
srcs: ["bar-doc/IBar.aidl"],
path: "bar-doc",
}
droiddoc {
name: "bar-doc",
srcs: [
"bar-doc/a.java",
"bar-doc/IFoo.aidl",
":bar-doc-aidl-srcs",
],
exclude_srcs: [
"bar-doc/b.java"
],
custom_template: "droiddoc-templates-sdk",
hdf: [
"android.whichdoc offline",
],
knowntags: [
"bar-doc/known_oj_tags.txt",
],
proofread_file: "libcore-proofread.txt",
todo_file: "libcore-docs-todo.html",
flags: ["-offlinemode -title \"libcore\""],
args: "-offlinemode -title \"libcore\"",
}
`)
}
func TestDroidstubsWithSystemModules(t *testing.T) {
ctx, _ := testJava(t, `
droidstubs {