ApiLevel of "" and "core_platform" is FutureApiLevel
If sdk_version is set to "", it means the module is built with the in-development version of the platform APIs. "core_platform" means the in-development version of the core Java APIs. In both cases, the API level (i.e. which version to use) is the in-development version. Bug: 1663140 Test: m Change-Id: Ia184190341223e9ac12710a8bb3a25004fd4f539
This commit is contained in:
@@ -147,6 +147,11 @@ func (s SdkSpec) ForVendorPartition(ctx EarlyModuleContext) SdkSpec {
|
|||||||
|
|
||||||
// UsePrebuilt determines whether prebuilt SDK should be used for this SdkSpec with the given context.
|
// UsePrebuilt determines whether prebuilt SDK should be used for this SdkSpec with the given context.
|
||||||
func (s SdkSpec) UsePrebuilt(ctx EarlyModuleContext) bool {
|
func (s SdkSpec) UsePrebuilt(ctx EarlyModuleContext) bool {
|
||||||
|
switch s {
|
||||||
|
case SdkSpecNone, SdkSpecCorePlatform, SdkSpecPrivate:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if s.ApiLevel.IsCurrent() {
|
if s.ApiLevel.IsCurrent() {
|
||||||
// "current" can be built from source and be from prebuilt SDK
|
// "current" can be built from source and be from prebuilt SDK
|
||||||
return ctx.Config().AlwaysUsePrebuiltSdks()
|
return ctx.Config().AlwaysUsePrebuiltSdks()
|
||||||
@@ -159,7 +164,6 @@ func (s SdkSpec) UsePrebuilt(ctx EarlyModuleContext) bool {
|
|||||||
// numbered SDKs are always from prebuilt
|
// numbered SDKs are always from prebuilt
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// "", "none", "core_platform" fall here
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,10 +207,8 @@ func (s SdkSpec) EffectiveVersionString(ctx EarlyModuleContext) (string, error)
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
SdkSpecNone = SdkSpec{SdkNone, NoneApiLevel, "(no version)"}
|
SdkSpecNone = SdkSpec{SdkNone, NoneApiLevel, "(no version)"}
|
||||||
// TODO(b/175678607) ApiLevel of SdkSpecPrivate should be FutureApiLevel
|
SdkSpecPrivate = SdkSpec{SdkPrivate, FutureApiLevel, ""}
|
||||||
SdkSpecPrivate = SdkSpec{SdkPrivate, NoneApiLevel, ""}
|
SdkSpecCorePlatform = SdkSpec{SdkCorePlatform, FutureApiLevel, "core_platform"}
|
||||||
// TODO(b/175678607) ApiLevel of SdkSpecCorePlatform should be FutureApiLevel
|
|
||||||
SdkSpecCorePlatform = SdkSpec{SdkCorePlatform, NoneApiLevel, "core_platform"}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func SdkSpecFrom(ctx EarlyModuleContext, str string) SdkSpec {
|
func SdkSpecFrom(ctx EarlyModuleContext, str string) SdkSpec {
|
||||||
|
Reference in New Issue
Block a user