use of com.android.bundle.Targeting.VariantTargeting in project bundletool by google.
the class TargetingUtilsTest method variantMultiAbiTargeting_byAbiAliasAndAlternativesSet.
@Test
public void variantMultiAbiTargeting_byAbiAliasAndAlternativesSet() {
VariantTargeting expectedTargeting = VariantTargeting.newBuilder().setMultiAbiTargeting(SINGLE_ABI_WITH_ALTERNATIVES).build();
assertThat(TargetingUtils.variantMultiAbiTargeting(X86, ImmutableSet.of(ARMEABI_V7A, ARM64_V8A))).isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.VariantTargeting in project bundletool by google.
the class TargetingUtilsTest method variantMultiAbiTargetingFromAllTergeting.
@Test
public void variantMultiAbiTargetingFromAllTergeting() {
ImmutableSet<ImmutableSet<AbiAlias>> allTargeting = ImmutableSet.of(ImmutableSet.of(ARMEABI_V7A), ImmutableSet.of(ARM64_V8A), ImmutableSet.of(X86));
VariantTargeting expectedTargeting = VariantTargeting.newBuilder().setMultiAbiTargeting(SINGLE_ABI_WITH_ALTERNATIVES).build();
assertThat(TargetingUtils.variantMultiAbiTargetingFromAllTargeting(ImmutableSet.of(X86), allTargeting)).ignoringRepeatedFieldOrder().isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.VariantTargeting in project bundletool by google.
the class TargetingUtilsTest method variantMultiAbiTargeting_byMultipleAbisAndAlternatives.
@Test
public void variantMultiAbiTargeting_byMultipleAbisAndAlternatives() {
VariantTargeting expectedTargeting = VariantTargeting.newBuilder().setMultiAbiTargeting(MULTI_ABI_WITH_ALTERNATIVES).build();
assertThat(TargetingUtils.variantMultiAbiTargeting(ImmutableSet.of(ImmutableSet.of(X86), ImmutableSet.of(ARMEABI_V7A, ARM64_V8A)), ImmutableSet.of(ImmutableSet.of(X86_64)))).ignoringRepeatedFieldOrder().isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.VariantTargeting in project bundletool by google.
the class TargetingUtilsTest method variantMultiAbiTargeting_byMultiAbiTargeting.
@Test
public void variantMultiAbiTargeting_byMultiAbiTargeting() {
VariantTargeting expectedTargeting = VariantTargeting.newBuilder().setMultiAbiTargeting(MULTI_ABI_WITH_ALTERNATIVES).build();
assertThat(TargetingUtils.variantMultiAbiTargeting(MULTI_ABI_WITH_ALTERNATIVES)).ignoringRepeatedFieldOrder().isEqualTo(expectedTargeting);
}
use of com.android.bundle.Targeting.VariantTargeting in project bundletool by google.
the class VariantGeneratorTest method variantsWithV3SigningRestrictedToRPlus.
@Test
public void variantsWithV3SigningRestrictedToRPlus() throws Exception {
BundleModule bundleModule = new BundleModuleBuilder("testModule").setManifest(androidManifest("com.test.app")).build();
VariantGenerator variantGenerator = new VariantGenerator();
ImmutableCollection<VariantTargeting> splits = variantGenerator.generateVariants(bundleModule, ApkGenerationConfiguration.builder().setMinSdkForAdditionalVariantWithV3Rotation(ANDROID_R_API_VERSION).build());
assertThat(splits).containsExactly(lPlusVariantTargeting(), variantMinSdkTargeting(ANDROID_R_API_VERSION));
}
Aggregations