Update max_sdk_version from SdkSpec to ApiLevel
max_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 max_sdk_version in bp files Bug: 208456999 Test: no change in ninja file (this should be a no-op) Test: TH Change-Id: I304b5ad802bde200137d8e225182828dfd6f7227
This commit is contained in:
@@ -136,11 +136,11 @@ func configuredJarListToClasspathJars(ctx android.ModuleContext, configuredJars
|
||||
jar.minSdkVersion = s.minSdkVersion.String()
|
||||
}
|
||||
}
|
||||
if s.maxSdkVersion.ApiLevel.Specified() {
|
||||
if s.maxSdkVersion.ApiLevel.IsCurrent() {
|
||||
if s.maxSdkVersion.Specified() {
|
||||
if s.maxSdkVersion.IsCurrent() {
|
||||
jar.maxSdkVersion = ctx.Config().DefaultAppTargetSdk(ctx).String()
|
||||
} else {
|
||||
jar.maxSdkVersion = s.maxSdkVersion.ApiLevel.String()
|
||||
jar.maxSdkVersion = s.maxSdkVersion.String()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user