Create bundle modules suitable for bundletool
Create a bundle module in addition to creating an APK, which can then optionally be merged with bundle modules from builds for other architectures and then be passed to bundletool to create an app bundle. Bug: 117295826 Test: tapas RecoveryLocalizer && m dist Change-Id: I98a17d7407dc56823ece9ec88c087780185a6555
This commit is contained in:
@@ -83,6 +83,8 @@ type AndroidApp struct {
|
||||
extraLinkFlags []string
|
||||
|
||||
installJniLibs []jniLib
|
||||
|
||||
bundleFile android.Path
|
||||
}
|
||||
|
||||
func (a *AndroidApp) ExportedProguardFlagFiles() android.Paths {
|
||||
@@ -277,6 +279,10 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
CreateAppPackage(ctx, packageFile, a.exportPackage, jniJarFile, dexJarFile, certificates)
|
||||
a.outputFile = packageFile
|
||||
|
||||
bundleFile := android.PathForModuleOut(ctx, "base.zip")
|
||||
BuildBundleModule(ctx, bundleFile, a.exportPackage, jniJarFile, dexJarFile)
|
||||
a.bundleFile = bundleFile
|
||||
|
||||
if ctx.ModuleName() == "framework-res" {
|
||||
// framework-res.apk is installed as system/framework/framework-res.apk
|
||||
ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"), ctx.ModuleName()+".apk", a.outputFile)
|
||||
|
Reference in New Issue
Block a user