Remove special case for sdk_version: "none"
The dependency handling for sdk_version: "none" (which propagated to
!sdkDep.hasStandardLibs()) was very similar to the normal useModule
case. Combine the cases by making decodeSdkDep set useModule: true
and put the system modules in modules for the sdk_version: "none"
case.
Test: TestClasspath
Change-Id: Icc9ff4d43a38da25cc0e3628be95951d61773ad5
diff --git a/java/sdk.go b/java/sdk.go
index c6a9a73..d8584d2 100644
--- a/java/sdk.go
+++ b/java/sdk.go
@@ -192,13 +192,16 @@
ctx.PropertyErrorf("sdk_version",
`system_modules is required to be set to a non-empty value when sdk_version is "none", did you mean sdk_version: "core_platform"?`)
} else if systemModules == "none" {
- // Normalize no system modules to an empty string.
- systemModules = ""
+ return sdkDep{
+ noStandardLibs: true,
+ }
}
return sdkDep{
+ useModule: true,
noStandardLibs: true,
systemModules: systemModules,
+ modules: []string{systemModules},
}
case "core_platform":
return sdkDep{