use of com.android.tools.build.bundletool.model.ModuleSplit.SplitType.SPLIT in project bundletool by google.
the class LocaleConfigXmlInjectorTest method process_noLanguageTargeting.
@Test
public void process_noLanguageTargeting() throws Exception {
ModuleSplit baseMasterSplit = createModuleSplit(new ResourceTableBuilder().addPackage("com.example.app.module").build(), BASE_MODULE_NAME.getName(), /* masterSplit= */
true, SPLIT, /* languageTargeting= */
null);
ModuleSplit otherSplit = createModuleSplit(new ResourceTableBuilder().addPackage("com.example.app.module").build(), BASE_MODULE_NAME.getName(), /* masterSplit= */
false, SPLIT, /* languageTargeting= */
null);
ModuleSplit processedBaseMasterSplit = localeConfigXmlInjector.process(VariantKey.create(baseMasterSplit), ImmutableList.of(baseMasterSplit, otherSplit)).stream().filter(split -> split.isMasterSplit() && split.isBaseModuleSplit()).collect(onlyElement());
assertThat(processedBaseMasterSplit.getAndroidManifest().hasLocaleConfig()).isFalse();
assertThat(processedBaseMasterSplit.getResourceTable().get()).doesNotContainResource("com.example.app.module:xml/locales_config");
}
Aggregations