Reapply "Use R8 for resource shrinking"

This reverts commit a9fd59a7f2.

We are moving the resource shinking pipeline into r8 (gennerally, not just for platform)

This disables the usage of the resource shrinker cli from cmd-line tools

There are no changes in this cl compared to the original land, the fix
was done in R8 (to use the same compression for res folder entries as
in the original)

Bug: 308710394
Bug: 309078004
Test: Existing, validated that resource table on SystemUI was byte<>byte equal, validated uncompression

Ignore-AOSP-First: Merge does not apply cleanly

Change-Id: Ib8a6fb128084e994325b975c46a036cb41494654
This commit is contained in:
Rico Wind
2023-11-23 08:41:28 +01:00
parent f24ed7e3a9
commit 20c2010030
6 changed files with 46 additions and 125 deletions

View File

@@ -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, shrinkResources bool) {
packageFile, jniJarFile, dexJarFile android.Path, certificates []Certificate, deps android.Paths, v4SignatureFile android.WritablePath, lineageFile android.Path, rotationMinSdkVersion string) {
unsignedApkName := strings.TrimSuffix(outputFile.Base(), ".apk") + "-unsigned.apk"
unsignedApk := android.PathForModuleOut(ctx, unsignedApkName)
@@ -71,12 +71,6 @@ 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)
}