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
diff --git a/java/java_test.go b/java/java_test.go
index 5e43ce5..f61f4bb 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -1247,6 +1247,20 @@
`)
}
+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