Merge "Revert "Make min_sdk overridable in override_apex"" into udc-dev am: e80e5d8531
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/23374036 Change-Id: Ic5fcfb0cb1307bd271c2c9df3a855c87b12bb2db Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
14
apex/apex.go
14
apex/apex.go
@@ -137,6 +137,10 @@ type apexBundleProperties struct {
|
|||||||
// List of filesystem images that are embedded inside this APEX bundle.
|
// List of filesystem images that are embedded inside this APEX bundle.
|
||||||
Filesystems []string
|
Filesystems []string
|
||||||
|
|
||||||
|
// The minimum SDK version that this APEX must support at minimum. This is usually set to
|
||||||
|
// the SDK version that the APEX was first introduced.
|
||||||
|
Min_sdk_version *string
|
||||||
|
|
||||||
// Whether this APEX is considered updatable or not. When set to true, this will enforce
|
// Whether this APEX is considered updatable or not. When set to true, this will enforce
|
||||||
// additional rules for making sure that the APEX is truly updatable. To be updatable,
|
// additional rules for making sure that the APEX is truly updatable. To be updatable,
|
||||||
// min_sdk_version should be set as well. This will also disable the size optimizations like
|
// min_sdk_version should be set as well. This will also disable the size optimizations like
|
||||||
@@ -380,10 +384,6 @@ type overridableProperties struct {
|
|||||||
|
|
||||||
// Trim against a specific Dynamic Common Lib APEX
|
// Trim against a specific Dynamic Common Lib APEX
|
||||||
Trim_against *string
|
Trim_against *string
|
||||||
|
|
||||||
// The minimum SDK version that this APEX must support at minimum. This is usually set to
|
|
||||||
// the SDK version that the APEX was first introduced.
|
|
||||||
Min_sdk_version *string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type apexBundle struct {
|
type apexBundle struct {
|
||||||
@@ -2924,7 +2924,7 @@ func (a *apexBundle) minSdkVersionValue(ctx android.EarlyModuleContext) string {
|
|||||||
// Only override the minSdkVersion value on Apexes which already specify
|
// Only override the minSdkVersion value on Apexes which already specify
|
||||||
// a min_sdk_version (it's optional for non-updatable apexes), and that its
|
// a min_sdk_version (it's optional for non-updatable apexes), and that its
|
||||||
// min_sdk_version value is lower than the one to override with.
|
// min_sdk_version value is lower than the one to override with.
|
||||||
minApiLevel := minSdkVersionFromValue(ctx, proptools.String(a.overridableProperties.Min_sdk_version))
|
minApiLevel := minSdkVersionFromValue(ctx, proptools.String(a.properties.Min_sdk_version))
|
||||||
if minApiLevel.IsNone() {
|
if minApiLevel.IsNone() {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -3575,8 +3575,8 @@ func convertWithBp2build(a *apexBundle, ctx android.TopDownMutatorContext) (baze
|
|||||||
// TODO(b/219503907) this would need to be set to a.MinSdkVersionValue(ctx) but
|
// TODO(b/219503907) this would need to be set to a.MinSdkVersionValue(ctx) but
|
||||||
// given it's coming via config, we probably don't want to put it in here.
|
// given it's coming via config, we probably don't want to put it in here.
|
||||||
var minSdkVersion bazel.StringAttribute
|
var minSdkVersion bazel.StringAttribute
|
||||||
if a.overridableProperties.Min_sdk_version != nil {
|
if a.properties.Min_sdk_version != nil {
|
||||||
minSdkVersion.SetValue(*a.overridableProperties.Min_sdk_version)
|
minSdkVersion.SetValue(*a.properties.Min_sdk_version)
|
||||||
}
|
}
|
||||||
if props, ok := productVariableProps[minSdkVersionPropName]; ok {
|
if props, ok := productVariableProps[minSdkVersionPropName]; ok {
|
||||||
for c, p := range props {
|
for c, p := range props {
|
||||||
|
Reference in New Issue
Block a user