java_sdk_library: Add sdk_version for API scopes

Allow the sdk_version against which the stubs for a scope are compiled
to be specified in the module on a per scope basis.

Bug: 155164730
Test: m nothing
Change-Id: I5881e5ee7c2169c30f544882344a60a602dae917
This commit is contained in:
Paul Duffin
2020-05-12 11:50:28 +01:00
parent 717e50c630
commit 87a05a389d
3 changed files with 98 additions and 1 deletions

View File

@@ -1247,6 +1247,20 @@ func TestJavaSdkLibrary_InvalidScopes(t *testing.T) {
`)
}
func TestJavaSdkLibrary_SdkVersion_ForScope(t *testing.T) {
testJava(t, `
java_sdk_library {
name: "foo",
srcs: ["a.java", "b.java"],
api_packages: ["foo"],
system: {
enabled: true,
sdk_version: "module_current",
},
}
`)
}
var compilerFlagsTestCases = []struct {
in string
out bool