Merge "Copy imported APKs to output filename" into main am: 5af242249d
am: 84d32c5b1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2652823 Change-Id: I4d1d9f10003b565b70f6023d28c747f45cef129d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -335,11 +335,19 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
|
|||||||
// Sign or align the package if package has not been preprocessed
|
// Sign or align the package if package has not been preprocessed
|
||||||
|
|
||||||
if proptools.Bool(a.properties.Preprocessed) {
|
if proptools.Bool(a.properties.Preprocessed) {
|
||||||
output := srcApk
|
var output android.WritablePath
|
||||||
if !proptools.Bool(a.properties.Skip_preprocessed_apk_checks) {
|
if !proptools.Bool(a.properties.Skip_preprocessed_apk_checks) {
|
||||||
writableOutput := android.PathForModuleOut(ctx, "validated-prebuilt", apkFilename)
|
output = android.PathForModuleOut(ctx, "validated-prebuilt", apkFilename)
|
||||||
a.validatePreprocessedApk(ctx, srcApk, writableOutput)
|
a.validatePreprocessedApk(ctx, srcApk, output)
|
||||||
output = writableOutput
|
} else {
|
||||||
|
// If using the input APK unmodified, still make a copy of it so that the output filename has the
|
||||||
|
// right basename.
|
||||||
|
output = android.PathForModuleOut(ctx, apkFilename)
|
||||||
|
ctx.Build(pctx, android.BuildParams{
|
||||||
|
Rule: android.Cp,
|
||||||
|
Input: srcApk,
|
||||||
|
Output: output,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
a.outputFile = output
|
a.outputFile = output
|
||||||
a.certificate = PresignedCertificate
|
a.certificate = PresignedCertificate
|
||||||
|
Reference in New Issue
Block a user