Merge "Add additional_certificates to android_app_import." am: 05ebca4f7f
am: 6ea8f69bc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622565 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9ccbc3abbfad8807ca00f4fd27a23d975483f6b3
This commit is contained in:
@@ -67,6 +67,9 @@ type AndroidAppImportProperties struct {
|
||||
// module name in the form ":module". Should be empty if presigned or default_dev_cert is set.
|
||||
Certificate *string
|
||||
|
||||
// Names of extra android_app_certificate modules to sign the apk with in the form ":module".
|
||||
Additional_certificates []string
|
||||
|
||||
// Set this flag to true if the prebuilt apk is already signed. The certificate property must not
|
||||
// be set for presigned modules.
|
||||
Presigned *bool
|
||||
@@ -156,6 +159,16 @@ func (a *AndroidAppImport) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
ctx.AddDependency(ctx.Module(), certificateTag, cert)
|
||||
}
|
||||
|
||||
for _, cert := range a.properties.Additional_certificates {
|
||||
cert = android.SrcIsModule(cert)
|
||||
if cert != "" {
|
||||
ctx.AddDependency(ctx.Module(), certificateTag, cert)
|
||||
} else {
|
||||
ctx.PropertyErrorf("additional_certificates",
|
||||
`must be names of android_app_certificate modules in the form ":module"`)
|
||||
}
|
||||
}
|
||||
|
||||
a.usesLibrary.deps(ctx, !a.isPrebuiltFrameworkRes())
|
||||
}
|
||||
|
||||
@@ -303,9 +316,6 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
|
||||
// If the certificate property is empty at this point, default_dev_cert must be set to true.
|
||||
// Which makes processMainCert's behavior for the empty cert string WAI.
|
||||
certificates = processMainCert(a.ModuleBase, String(a.properties.Certificate), certificates, ctx)
|
||||
if len(certificates) != 1 {
|
||||
ctx.ModuleErrorf("Unexpected number of certificates were extracted: %q", certificates)
|
||||
}
|
||||
a.certificate = certificates[0]
|
||||
signed := android.PathForModuleOut(ctx, "signed", apkFilename)
|
||||
var lineageFile android.Path
|
||||
|
Reference in New Issue
Block a user