java_sdk_library: Add system-server scope

Bug: 155164730
Test: m nothing
Merged-In: I49a2dab5c064b05f16691a3fae65f2b4ffc53bfd
Change-Id: I49a2dab5c064b05f16691a3fae65f2b4ffc53bfd
(cherry picked from commit 5a757b1ebb)
This commit is contained in:
Paul Duffin
2020-06-02 13:00:08 +01:00
parent 2752d926a9
commit 0c5bae5e83
4 changed files with 165 additions and 3 deletions

View File

@@ -1448,6 +1448,38 @@ func TestJavaSdkLibrary_SdkVersion_ForScope(t *testing.T) {
`)
}
func TestJavaSdkLibrary_ModuleLib(t *testing.T) {
testJava(t, `
java_sdk_library {
name: "foo",
srcs: ["a.java", "b.java"],
api_packages: ["foo"],
system: {
enabled: true,
},
module_lib: {
enabled: true,
},
}
`)
}
func TestJavaSdkLibrary_SystemServer(t *testing.T) {
testJava(t, `
java_sdk_library {
name: "foo",
srcs: ["a.java", "b.java"],
api_packages: ["foo"],
system: {
enabled: true,
},
system_server: {
enabled: true,
},
}
`)
}
func TestJavaSdkLibrary_MissingScope(t *testing.T) {
testJavaError(t, `requires api scope module-lib from foo but it only has \[\] available`, `
java_sdk_library {