@NonNull @Override public ApiVersion getMinSdkVersion() { return testVariantConfig.getMinSdkVersion(); }
/** * Returns the minimum SDK version for this variant, potentially overridden by a property passed * by the IDE. * * @see VariantConfiguration#getMinSdkVersion() */ @NonNull @Override public ApiVersion getMinSdkVersion() { // The changed behavior comes from overriding getApiVersionsNonTestVariant(). return super.getMinSdkVersion(); }
@NonNull @Override public ApiVersion getMinSdkVersion() { return testVariantConfig.getMinSdkVersion(); }
public boolean isLegacyMultiDexMode() { return isMultiDexEnabled() && getMinSdkVersion().getApiLevel() < 21; }
/** * Return the minSdkVersion for this variant. * * <p>This uses both the value from the manifest (if present), and the override coming from the * flavor(s) (if present). The value of the minSdkVersion will be combined with the value of the * targetSdkVersion. For the details of the overlaying logic check {@link * #getCalculatedApiVersions(ApiVersion, ApiVersion)} method. * * @return the minSdkVersion */ @NonNull public ApiVersion getMinSdkVersion() { if (mTestedConfig != null) { return mTestedConfig.getMinSdkVersion(); } return getApiVersionsNonTestVariant().minSdkVersion; }
public boolean isLegacyMultiDexMode() { if (!isMultiDexEnabled()) { return false; } ApiVersion minSdk = getMinSdkVersion(); if (minSdk.getCodename() == null) { return minSdk.getApiLevel() < 21; } else { return SdkVersionInfo.getApiByPreviewName(minSdk.getCodename(), true) < 21; } }
/** * Return the minSdkVersion for filtering out resources. * * <p>This is always the minimum SDK version read from the manifest and/or DSL, ignoring the * property passed from the IDE. This way R.java contents don't change depending on the device * selected in the IDE. */ @NonNull public ApiVersion getResourcesMinSdkVersion() { VariantConfiguration testedConfig = getTestedConfig(); if (testedConfig == null) { return super.getApiVersionsNonTestVariant().minSdkVersion; } else if (testedConfig instanceof GradleVariantConfiguration) { return ((GradleVariantConfiguration) testedConfig).getResourcesMinSdkVersion(); } else { return testedConfig.getMinSdkVersion(); } }
/** * Return the minSdkVersion for this variant. * * This uses both the value from the manifest (if present), and the override coming * from the flavor(s) (if present). * @return the minSdkVersion */ @NonNull public ApiVersion getMinSdkVersion() { if (mTestedConfig != null) { return mTestedConfig.getMinSdkVersion(); } ApiVersion minSdkVersion = mMergedFlavor.getMinSdkVersion(); if (minSdkVersion == null) { // read it from the main manifest File manifestLocation = mDefaultSourceProvider.getManifestFile(); minSdkVersion = DefaultApiVersion.create( sManifestParser.getMinSdkVersion(manifestLocation)); } return minSdkVersion; }
public int getRenderscriptTarget() { ProductFlavor mergedFlavor = getMergedFlavor(); int targetApi = mergedFlavor.getRenderscriptTargetApi() != null ? mergedFlavor.getRenderscriptTargetApi() : -1; ApiVersion apiVersion = getMinSdkVersion(); int minSdk = apiVersion.getApiLevel(); if (apiVersion.getCodename() != null) { minSdk = SdkVersionInfo.getApiByBuildCode(apiVersion.getCodename(), true); } return targetApi > minSdk ? targetApi : minSdk; }
for (final DeviceConnector device : devices) { if (InstallUtils.checkDeviceApiLevel( device, variantConfig.getMinSdkVersion(), iLogger, projectName, variantName)) {
packageSplitAbiTask.setAndroidBuilder(this.scope.getGlobalScope().getAndroidBuilder()); packageSplitAbiTask.setVariantName(config.getFullName()); packageSplitAbiTask.setMinSdkVersion(config.getMinSdkVersion()); packageSplitAbiTask.incrementalDir = this.scope.getIncrementalDir( packageSplitAbiTask.getName());