Update min_sdk_version from SdkSpec to ApiLevel
min_sdk_version signifies device version and does not need an sdkKind to describe it fully. Update the type and cleanup existing usages. As a side benefit, we also get better error handling since users can no longer enter something like `public_30` as a valid min_sdk_version in bp files Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a followup CL Test: m nothing Test: no change in ninja files (this should be a no-op) Bug: 208456999 Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
This commit is contained in:
@@ -130,13 +130,13 @@ func configuredJarListToClasspathJars(ctx android.ModuleContext, configuredJars
|
||||
if s, ok := m.(*SdkLibrary); ok {
|
||||
// TODO(208456999): instead of mapping "current" to latest, min_sdk_version should never be set to "current"
|
||||
if s.minSdkVersion.Specified() {
|
||||
if s.minSdkVersion.ApiLevel.IsCurrent() {
|
||||
if s.minSdkVersion.IsCurrent() {
|
||||
jar.minSdkVersion = ctx.Config().DefaultAppTargetSdk(ctx).String()
|
||||
} else {
|
||||
jar.minSdkVersion = s.minSdkVersion.ApiLevel.String()
|
||||
jar.minSdkVersion = s.minSdkVersion.String()
|
||||
}
|
||||
}
|
||||
if s.maxSdkVersion.Specified() {
|
||||
if s.maxSdkVersion.ApiLevel.Specified() {
|
||||
if s.maxSdkVersion.ApiLevel.IsCurrent() {
|
||||
jar.maxSdkVersion = ctx.Config().DefaultAppTargetSdk(ctx).String()
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user