@Nullable public String getTestedApplicationId() { if (mType.isForTesting()) { checkState(mTestedConfig != null); if (mTestedConfig.mType == VariantType.LIBRARY) { return getApplicationId(); } else { return mTestedConfig.getApplicationId(); } } return null; }
@Input @Optional public String getPackageOverride() { return variantConfiguration.getApplicationId(); }
@Nullable public String getTestedApplicationId() { if (mType.isForTesting()) { checkState(mTestedConfig != null); if (mTestedConfig.mType == VariantType.LIBRARY) { return getApplicationId(); } else { return mTestedConfig.getApplicationId(); } } return null; }
@NonNull public String getTestApplicationId(){ checkState(mType.isForTesting()); if (!Strings.isNullOrEmpty(mMergedFlavor.getTestApplicationId())) { // if it's specified through build file read from there return mMergedFlavor.getTestApplicationId(); } else { // otherwise getApplicationId() contains rules for getting the // applicationId for the test app from the tested application return getApplicationId(); } }
/** * Returns the original application ID before any overrides from flavors. * If the variant is a test variant, then the application ID is the one coming from the * configuration of the tested variant, and this call is similar to {@link #getApplicationId()} * @return the original application ID */ @Nullable public String getOriginalApplicationId() { if (mType.isForTesting()) { return getApplicationId(); } return getPackageFromManifest(); }
/** * Returns the original application ID before any overrides from flavors. * If the variant is a test variant, then the application ID is the one coming from the * configuration of the tested variant, and this call is similar to {@link #getApplicationId()} * @return the original application ID */ @Nullable public String getOriginalApplicationId() { if (mType.isForTesting()) { return getApplicationId(); } return getPackageFromManifest(); }
String testedPackage = mTestedConfig.getApplicationId(); if (id == null) { id = testedPackage + ".test";
String testedPackage = mTestedConfig.getApplicationId(); if (id == null) { id = testedPackage + ".test";
generateSplitAbiRes.setSplits(filters); generateSplitAbiRes.setOutputBaseName(config.getBaseName()); generateSplitAbiRes.setApplicationId(config.getApplicationId()); generateSplitAbiRes.setVersionCode(config.getVersionCode()); generateSplitAbiRes.setVersionName(config.getVersionName());
@Override public void execute(@NonNull GenerateSplitAbiRes generateSplitAbiRes) { final VariantConfiguration config = scope.getVariantConfiguration(); Set<String> filters = AbiSplitOptions.getAbiFilters( scope.getGlobalScope().getExtension().getSplits().getAbiFilters()); generateSplitAbiRes.setAndroidBuilder(scope.getGlobalScope().getAndroidBuilder()); generateSplitAbiRes.setVariantName(config.getFullName()); generateSplitAbiRes.setOutputDirectory(scope.getGenerateSplitAbiResOutputDirectory()); generateSplitAbiRes.setSplits(filters); generateSplitAbiRes.setOutputBaseName(config.getBaseName()); generateSplitAbiRes.setApplicationId(config.getApplicationId()); generateSplitAbiRes.variantOutputData = (ApkVariantOutputData) scope.getVariantData().getMainOutput(); ConventionMappingHelper.map(generateSplitAbiRes, "debuggable", new Callable<Boolean>() { @Override public Boolean call() throws Exception { return config.getBuildType().isDebuggable(); } }); ConventionMappingHelper.map(generateSplitAbiRes, "aaptOptions", new Callable<AaptOptions>() { @Override public AaptOptions call() throws Exception { return scope.getGlobalScope().getExtension().getAaptOptions(); } }); } }