diff options
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/apex/apex.go b/apex/apex.go index 30515535a..0ac6eaa89 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -151,12 +151,6 @@ type apexBundleProperties struct { // Default: true. Installable *bool - // Whether this APEX can be compressed or not. Setting this property to false means this - // APEX will never be compressed. When set to true, APEX will be compressed if other - // conditions, e.g, target device needs to support APEX compression, are also fulfilled. - // Default: true. - Compressible *bool - // If set true, VNDK libs are considered as stable libs and are not included in this APEX. // Should be only used in non-system apexes (e.g. vendor: true). Default is false. Use_vndk_as_stable *bool @@ -347,6 +341,12 @@ type overridableProperties struct { // certificate and the private key are provided from the android_app_certificate module // named "module". Certificate *string + + // Whether this APEX can be compressed or not. Setting this property to false means this + // APEX will never be compressed. When set to true, APEX will be compressed if other + // conditions, e.g., target device needs to support APEX compression, are also fulfilled. + // Default: false. + Compressible *bool } type apexBundle struct { @@ -1310,7 +1310,7 @@ func (a *apexBundle) EnableCoverageIfNeeded() {} var _ android.ApexBundleDepsInfoIntf = (*apexBundle)(nil) -// Implements android.ApexBudleDepsInfoIntf +// Implements android.ApexBundleDepsInfoIntf func (a *apexBundle) Updatable() bool { return proptools.BoolDefault(a.properties.Updatable, true) } @@ -3289,6 +3289,7 @@ type bazelApexBundleAttributes struct { Prebuilts bazel.LabelListAttribute Native_shared_libs_32 bazel.LabelListAttribute Native_shared_libs_64 bazel.LabelListAttribute + Compressible bazel.BoolAttribute } type convertedNativeSharedLibs struct { @@ -3366,6 +3367,11 @@ func (a *apexBundle) ConvertWithBp2build(ctx android.TopDownMutatorContext) { installableAttribute.Value = a.properties.Installable } + var compressibleAttribute bazel.BoolAttribute + if a.overridableProperties.Compressible != nil { + compressibleAttribute.Value = a.overridableProperties.Compressible + } + attrs := &bazelApexBundleAttributes{ Manifest: manifestLabelAttribute, Android_manifest: androidManifestLabelAttribute, @@ -3379,6 +3385,7 @@ func (a *apexBundle) ConvertWithBp2build(ctx android.TopDownMutatorContext) { Native_shared_libs_64: nativeSharedLibs.Native_shared_libs_64, Binaries: binariesLabelListAttribute, Prebuilts: prebuiltsLabelListAttribute, + Compressible: compressibleAttribute, } props := bazel.BazelTargetModuleProperties{ |