Test SdkSpecForm.
Bug: 190818041
Test: presubmit
Change-Id: Ib8cd891f03537712d709ed063dd76dee55221118
Merged-In: Ib8cd891f03537712d709ed063dd76dee55221118
(cherry picked from commit 0ee2f913ef
)
This commit is contained in:
@@ -117,7 +117,7 @@ func (s SdkSpec) Stable() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// PrebuiltSdkAvailableForUnbundledBuilt tells whether this SdkSpec can have a prebuilt SDK
|
||||
// PrebuiltSdkAvailableForUnbundledBuild tells whether this SdkSpec can have a prebuilt SDK
|
||||
// that can be used for unbundled builds.
|
||||
func (s SdkSpec) PrebuiltSdkAvailableForUnbundledBuild() bool {
|
||||
// "", "none", and "core_platform" are not available for unbundled build
|
||||
@@ -212,6 +212,10 @@ var (
|
||||
)
|
||||
|
||||
func SdkSpecFrom(ctx EarlyModuleContext, str string) SdkSpec {
|
||||
return SdkSpecFromWithConfig(ctx.Config(), str)
|
||||
}
|
||||
|
||||
func SdkSpecFromWithConfig(config Config, str string) SdkSpec {
|
||||
switch str {
|
||||
// special cases first
|
||||
case "":
|
||||
@@ -252,7 +256,7 @@ func SdkSpecFrom(ctx EarlyModuleContext, str string) SdkSpec {
|
||||
return SdkSpec{SdkInvalid, NoneApiLevel, str}
|
||||
}
|
||||
|
||||
apiLevel, err := ApiLevelFromUser(ctx, versionString)
|
||||
apiLevel, err := ApiLevelFromUserWithConfig(config, versionString)
|
||||
if err != nil {
|
||||
return SdkSpec{SdkInvalid, apiLevel, str}
|
||||
}
|
||||
|
Reference in New Issue
Block a user