use of com.android.tools.build.bundletool.model.BundleModule in project bundletool by google.
the class AndroidManifestValidatorTest method instantAssetModuleWithInstallTimeDelivery_throws.
@Test
public void instantAssetModuleWithInstallTimeDelivery_throws() throws Exception {
BundleModule module = new BundleModuleBuilder("assetmodule").setManifest(androidManifestForAssetModule(PKG_NAME, withInstallTimeDelivery(), withInstantOnDemandDelivery())).build();
InvalidBundleException exception = assertThrows(InvalidBundleException.class, () -> new AndroidManifestValidator().validateModule(module));
assertThat(exception).hasMessageThat().startsWith("Instant asset packs cannot have install-time delivery (module 'assetmodule').");
}
use of com.android.tools.build.bundletool.model.BundleModule in project bundletool by google.
the class AndroidManifestValidatorTest method nonBase_withOnDemandDeliveryElement_ok.
@Test
public void nonBase_withOnDemandDeliveryElement_ok() throws Exception {
BundleModule module = new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withOnDemandDelivery(), withFusingAttribute(true))).build();
new AndroidManifestValidator().validateModule(module);
}
use of com.android.tools.build.bundletool.model.BundleModule in project bundletool by google.
the class AndroidManifestValidatorTest method base_withFusingConfigTrue_ok.
@Test
public void base_withFusingConfigTrue_ok() throws Exception {
BundleModule module = new BundleModuleBuilder(BASE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withFusingAttribute(true))).build();
new AndroidManifestValidator().validateModule(module);
}
use of com.android.tools.build.bundletool.model.BundleModule in project bundletool by google.
the class AndroidManifestValidatorTest method bundleModules_sameVersionCode_ok.
@Test
public void bundleModules_sameVersionCode_ok() throws Exception {
ImmutableList<BundleModule> bundleModules = ImmutableList.of(new BundleModuleBuilder(BASE_MODULE_NAME).setManifest(androidManifest("com.test", withVersionCode(2))).build(), new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest("com.test", withVersionCode(2))).build());
new AndroidManifestValidator().validateAllModules(bundleModules);
}
use of com.android.tools.build.bundletool.model.BundleModule in project bundletool by google.
the class AndroidManifestValidatorTest method nonBase_withFusingConfigTrue_ok.
@Test
public void nonBase_withFusingConfigTrue_ok() throws Exception {
BundleModule module = new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withOnDemandAttribute(true), withFusingAttribute(true))).build();
new AndroidManifestValidator().validateModule(module);
}
Aggregations