Merge "Add property to apex soong modules to forcefully compress an APEX"

This commit is contained in:
Mohammad Islam
2021-01-12 13:51:50 +00:00
committed by Gerrit Code Review
2 changed files with 15 additions and 2 deletions

View File

@@ -763,9 +763,13 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
})
a.outputFile = signedOutputFile
// Process APEX compression if enabled
// Process APEX compression if enabled or forced
if ctx.ModuleDir() != "system/apex/apexd/apexd_testdata" && a.testOnlyShouldForceCompression() {
ctx.PropertyErrorf("test_only_force_compression", "not available")
return
}
compressionEnabled := ctx.Config().CompressedApex() && proptools.BoolDefault(a.properties.Compressible, true)
if compressionEnabled && apexType == imageApex {
if apexType == imageApex && (compressionEnabled || a.testOnlyShouldForceCompression()) {
a.isCompressed = true
unsignedCompressedOutputFile := android.PathForModuleOut(ctx, a.Name()+".capex.unsigned")