Add support for min_sdk_version
Add min_sdk_version properties and use it for aapt2 --min-sdk-version and --target-sdk-version flags. Add an sdkContext interface that any function that needs an sdk version can take in order to get the values for the current module. Bug: 110848854 Test: m checkbuild Change-Id: Ic69f1f935d8b865ec77689350407df08bfac5925
This commit is contained in:
@@ -81,7 +81,7 @@ type certificate struct {
|
||||
func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
a.Module.deps(ctx)
|
||||
if !Bool(a.properties.No_framework_libs) && !Bool(a.properties.No_standard_libs) {
|
||||
a.aapt.deps(ctx, String(a.deviceProperties.Sdk_version))
|
||||
a.aapt.deps(ctx, sdkContext(a))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
// TODO: LOCAL_PACKAGE_OVERRIDES
|
||||
// $(addprefix --rename-manifest-package , $(PRIVATE_MANIFEST_PACKAGE_NAME)) \
|
||||
|
||||
a.aapt.buildActions(ctx, String(a.deviceProperties.Sdk_version), linkFlags...)
|
||||
a.aapt.buildActions(ctx, sdkContext(a), linkFlags...)
|
||||
|
||||
// apps manifests are handled by aapt, don't let Module see them
|
||||
a.properties.Manifest = nil
|
||||
|
Reference in New Issue
Block a user