use of com.android.tools.build.bundletool.commands.BuildApksCommand.ApkBuildMode.PERSISTENT in project bundletool by google.
the class BuildApksManagerTest method buildApksCommand_persistentMode.
@Test
public void buildApksCommand_persistentMode() throws Exception {
AppBundle appBundle = new AppBundleBuilder().addModule("base", builder -> builder.setManifest(androidManifest("com.app", withInstant(true)))).build();
TestComponent.useTestModule(this, createTestModuleBuilder().withAppBundle(appBundle).withOutputPath(outputFilePath).withApkBuildMode(PERSISTENT).build());
buildApksManager.execute();
ZipFile apkSetFile = openZipFile(outputFilePath.toFile());
BuildApksResult result = extractTocFromApkSetFile(apkSetFile, outputDir);
assertThat(splitApkVariants(result)).isNotEmpty();
assertThat(standaloneApkVariants(result)).isNotEmpty();
assertThat(systemApkVariants(result)).isEmpty();
assertThat(instantApkVariants(result)).isEmpty();
}
use of com.android.tools.build.bundletool.commands.BuildApksCommand.ApkBuildMode.PERSISTENT in project bundletool by google.
the class BuildApksManagerTest method buildApksCommand_persistentModeWithAssetModules.
@Test
public void buildApksCommand_persistentModeWithAssetModules() throws Exception {
AppBundle appBundle = new AppBundleBuilder().addModule("base", builder -> builder.setManifest(androidManifest("com.app", withInstant(true)))).addModule("asset_module", builder -> builder.setManifest(androidManifestForAssetModule("com.app"))).build();
TestComponent.useTestModule(this, createTestModuleBuilder().withAppBundle(appBundle).withOutputPath(outputFilePath).withApkBuildMode(PERSISTENT).build());
buildApksManager.execute();
ZipFile apkSetFile = openZipFile(outputFilePath.toFile());
BuildApksResult result = extractTocFromApkSetFile(apkSetFile, outputDir);
assertThat(result.getAssetSliceSetList()).isNotEmpty();
}
Aggregations