aboutsummaryrefslogtreecommitdiffstats
path: root/java/sdk.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-10-28 15:10:03 -0700
committerColin Cross <ccross@android.com>2019-10-29 13:35:39 -0700
commit6d8d8c6a91dad242bbe406b2b055728b196fe8de (patch)
tree69bc117246cf314e5fc41512303ba968d5c8eb79 /java/sdk.go
parentbf3119ee353e4b5c635c030207359d89e372c446 (diff)
downloadbuild_soong-6d8d8c6a91dad242bbe406b2b055728b196fe8de.tar.gz
build_soong-6d8d8c6a91dad242bbe406b2b055728b196fe8de.tar.bz2
build_soong-6d8d8c6a91dad242bbe406b2b055728b196fe8de.zip
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
Diffstat (limited to 'java/sdk.go')
-rw-r--r--java/sdk.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/sdk.go b/java/sdk.go
index c6a9a73c..d8584d2b 100644
--- a/java/sdk.go
+++ b/java/sdk.go
@@ -192,13 +192,16 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep {
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{