apex supports ".apex" tag
Tests can embed non-compressed .apex output with the tag.
Bug: 221024307
Test: soong test
Change-Id: Id4a239d1897237105a064cea8c97029f5b996a98
diff --git a/apex/apex.go b/apex/apex.go
index d12a786..9ef5e4b 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -416,8 +416,12 @@
mergedNotices android.NoticeOutputs
// The built APEX file. This is the main product.
+ // Could be .apex or .capex
outputFile android.WritablePath
+ // The built uncompressed .apex file.
+ outputApexFile android.WritablePath
+
// The built APEX file in app bundle format. This file is not directly installed to the
// device. For an APEX, multiple app bundles are created each of which is for a specific ABI
// like arm, arm64, x86, etc. Then they are processed again (outside of the Android build
@@ -1284,6 +1288,12 @@
case "", android.DefaultDistTag:
// This is the default dist path.
return android.Paths{a.outputFile}, nil
+ case imageApexSuffix:
+ // uncompressed one
+ if a.outputApexFile != nil {
+ return android.Paths{a.outputApexFile}, nil
+ }
+ fallthrough
default:
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
}