Revert "Use R8 for resource shrinking"
Revert submission 2816534-r8resourceshrinking Reason for revert: b/309075997 Reverted changes: /q/submissionid:2816534-r8resourceshrinking Change-Id: Ic173491eaf22967fbad14fbcc85f6ddb2cf54d23
This commit is contained in:
committed by
Gerrit Code Review
parent
b56fe2825d
commit
a9fd59a7f2
@@ -52,7 +52,7 @@ var combineApk = pctx.AndroidStaticRule("combineApk",
|
||||
})
|
||||
|
||||
func CreateAndSignAppPackage(ctx android.ModuleContext, outputFile android.WritablePath,
|
||||
packageFile, jniJarFile, dexJarFile android.Path, certificates []Certificate, deps android.Paths, v4SignatureFile android.WritablePath, lineageFile android.Path, rotationMinSdkVersion string) {
|
||||
packageFile, jniJarFile, dexJarFile android.Path, certificates []Certificate, deps android.Paths, v4SignatureFile android.WritablePath, lineageFile android.Path, rotationMinSdkVersion string, shrinkResources bool) {
|
||||
|
||||
unsignedApkName := strings.TrimSuffix(outputFile.Base(), ".apk") + "-unsigned.apk"
|
||||
unsignedApk := android.PathForModuleOut(ctx, unsignedApkName)
|
||||
@@ -71,6 +71,12 @@ func CreateAndSignAppPackage(ctx android.ModuleContext, outputFile android.Writa
|
||||
Output: unsignedApk,
|
||||
Implicits: deps,
|
||||
})
|
||||
|
||||
if shrinkResources {
|
||||
shrunkenApk := android.PathForModuleOut(ctx, "resource-shrunken", unsignedApk.Base())
|
||||
ShrinkResources(ctx, unsignedApk, shrunkenApk)
|
||||
unsignedApk = shrunkenApk
|
||||
}
|
||||
SignAppPackage(ctx, outputFile, unsignedApk, certificates, v4SignatureFile, lineageFile, rotationMinSdkVersion)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user