ApplicationBaseFlavor

public interface ApplicationBaseFlavor extends BaseFlavor, ApplicationVariantDimension

Known direct subclasses
ApplicationDefaultConfig

Specifies defaults for properties that the Android application plugin applies to all build variants.

ApplicationProductFlavor

Encapsulates all product flavors properties for application projects.


Summary

Public methods

abstract String

The application ID.

abstract Integer

The maxSdkVersion, or null if not specified.

abstract Integer

The target SDK version.

abstract String

The target SDK version.

abstract Integer

Version code.

abstract String

Version name.

abstract void
maxSdkVersion(int maxSdkVersion)

This method is deprecated. Replaced by maxSdk property

abstract void
setApplicationId(String applicationId)

The application ID.

abstract void

The maxSdkVersion, or null if not specified.

abstract void
setTargetSdk(Integer targetSdk)

The target SDK version.

abstract void
setTargetSdkPreview(String targetSdkPreview)

The target SDK version.

abstract void
setTargetSdkVersion(String targetSdkVersion)

This method is deprecated. Replaced by targetSdkPreview property

abstract void
setVersionCode(Integer versionCode)

Version code.

abstract void
setVersionName(String versionName)

Version name.

abstract void
targetSdkVersion(int targetSdkVersion)

This method is deprecated. Replaced by targetSdk property

abstract void
targetSdkVersion(String targetSdkVersion)

This method is deprecated. Replaced by targetSdkPreview property

Inherited methods

From com.android.build.api.dsl.ApplicationVariantDimension
abstract String

Application id suffix.

abstract Boolean

Returns whether multi-dex is enabled.

abstract ApkSigningConfig

The associated signing config or null if none are set on the variant dimension.

abstract String

Version name suffix.

abstract void
setApplicationIdSuffix(String applicationIdSuffix)

Application id suffix.

abstract void
setMultiDexEnabled(Boolean multiDexEnabled)

Returns whether multi-dex is enabled.

abstract void

The associated signing config or null if none are set on the variant dimension.

abstract void
setVersionNameSuffix(String versionNameSuffix)

Version name suffix.

From com.android.build.api.dsl.BaseFlavor
abstract Integer

The minimum SDK version.

abstract String

The minimum SDK version.

abstract @NonNull String

The name of the flavor.

abstract Boolean

Whether the renderscript code should be compiled to generate C/C++ bindings.

abstract Boolean

Whether the renderscript BLAS support lib should be used to make it compatible with older versions of Android.

abstract Boolean

Whether the renderscript code should be compiled in support mode to make it compatible with older versions of Android.

abstract Integer

The renderscript target api, or null if not specified.

abstract @NonNull Set<@NonNull String>

Specifies a list of alternative resources to keep.

abstract String

Test application ID.

abstract Boolean

See instrumentation.

abstract Boolean

See instrumentation.

abstract String

Test instrumentation runner class name.

abstract @NonNull Map<@NonNull String, @NonNull String>

Test instrumentation runner custom arguments.

abstract @NonNull VectorDrawables

Options to configure the build-time support for vector drawables.

abstract Boolean

Whether to enable unbundling mode for embedded wear app.

abstract void

Copies all properties from the given flavor.

abstract void
minSdkVersion(int minSdkVersion)

This method is deprecated. Replaced by minSdk property

abstract void
minSdkVersion(String minSdkVersion)

This method is deprecated. Replaced by minSdkPreview property

abstract void
missingDimensionStrategy(
    @NonNull String dimension,
    @NonNull String requestedValue
)

Specifies a flavor that the plugin should try to use from a given dimension in a dependency.

abstract void
missingDimensionStrategy(
    @NonNull String dimension,
    @NonNull List<@NonNull String> requestedValues
)

Specifies a sorted list of flavors that the plugin should try to use from a given dimension in a dependency.

abstract void
missingDimensionStrategy(
    @NonNull String dimension,
    @NonNull String requestedValues
)

Specifies a sorted list of flavors that the plugin should try to use from a given dimension in a dependency.

abstract void

This method is deprecated. Replaced by resourceConfigurations field

abstract void

This method is deprecated. Replaced by resourceConfigurations field

abstract void

This method is deprecated. Replaced by resourceConfigurations field

abstract void

The minimum SDK version.

abstract void
setMinSdkPreview(String minSdkPreview)

The minimum SDK version.

abstract void
setMinSdkVersion(int minSdkVersion)

This method is deprecated. Replaced by minSdk property

abstract void
setMinSdkVersion(String minSdkVersion)

This method is deprecated. Replaced by minSdkPreview property

abstract void
setRenderscriptNdkModeEnabled(Boolean renderscriptNdkModeEnabled)

Whether the renderscript code should be compiled to generate C/C++ bindings.

abstract void
setRenderscriptSupportModeBlasEnabled(
    Boolean renderscriptSupportModeBlasEnabled
)

Whether the renderscript BLAS support lib should be used to make it compatible with older versions of Android.

abstract void
setRenderscriptSupportModeEnabled(
    Boolean renderscriptSupportModeEnabled
)

Whether the renderscript code should be compiled in support mode to make it compatible with older versions of Android.

abstract void
setRenderscriptTargetApi(Integer renderscriptTargetApi)

The renderscript target api, or null if not specified.

abstract void
setTestApplicationId(String testApplicationId)

Test application ID.

abstract Object
setTestFunctionalTest(boolean testFunctionalTest)

This method is deprecated. Replaced by testFunctionalTest property

abstract void
setTestFunctionalTest(Boolean testFunctionalTest)

See instrumentation.

abstract Object
setTestHandleProfiling(boolean testHandleProfiling)

This method is deprecated. Replaced by testFunctionalTest property

abstract void
setTestHandleProfiling(Boolean testHandleProfiling)

See instrumentation.

abstract void
setTestInstrumentationRunner(String testInstrumentationRunner)

Test instrumentation runner class name.

abstract Object
setTestInstrumentationRunnerArguments(
    @NonNull Map<@NonNull String, @NonNull String> testInstrumentationRunnerArguments
)

This method is deprecated. Replaced by testInstrumentationRunnerArguments property

abstract void
setWearAppUnbundled(Boolean wearAppUnbundled)

Whether to enable unbundling mode for embedded wear app.

abstract void

This method is deprecated. Replaced by testInstrumentationRunnerArguments property

abstract void

This method is deprecated. Replaced by testInstrumentationRunnerArguments property

abstract void

Configures VectorDrawables.

From com.android.build.api.dsl.VariantDimension
abstract void
addManifestPlaceholders(
    @NonNull Map<@NonNull String, @NonNull Object> manifestPlaceholders
)

Adds manifest placeholders.

abstract void
buildConfigField(
    @NonNull String type,
    @NonNull String name,
    @NonNull String value
)

Adds a new field to the generated BuildConfig class.

abstract void

Encapsulates per-variant CMake and ndk-build configurations for your external native build.

abstract @NonNull ExternalNativeBuildFlags

Encapsulates per-variant CMake and ndk-build configurations for your external native build.

abstract @NonNull JavaCompileOptions

Options for configuring Java compilation.

abstract @NonNull Map<@NonNull String, @NonNull Object>

The manifest placeholders.

abstract File

Text file that specifies additional classes that will be compiled into the main dex file.

abstract File

Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.

abstract @NonNull Ndk

Encapsulates per-variant configurations for the NDK, such as ABI filters.

abstract @NonNull Optimization
abstract @NonNull List<@NonNull File>

Specifies the ProGuard configuration files that the plugin should use.

abstract @NonNull Shaders

Options for configuring the shader compiler.

abstract @NonNull List<@NonNull File>

The collection of proguard rule files to be used when processing test code.

abstract void

Options for configuring Java compilation.

abstract void
ndk(@ExtensionFunctionType @NonNull Function1<@NonNull NdkUnit> action)

Encapsulates per-variant configurations for the NDK, such as ABI filters.

abstract void
abstract @NonNull Object
proguardFile(@NonNull Object proguardFile)

Adds a new ProGuard configuration file.

abstract @NonNull Object

Adds new ProGuard configuration files.

abstract void
resValue(@NonNull String type, @NonNull String name, @NonNull String value)

Adds a new generated resource.

abstract Void
setManifestPlaceholders(
    @NonNull Map<@NonNull String, @NonNull Object> manifestPlaceholders
)

This method is deprecated. Use manifestPlaceholders property instead

abstract void
setMultiDexKeepFile(File multiDexKeepFile)

Text file that specifies additional classes that will be compiled into the main dex file.

abstract void
setMultiDexKeepProguard(File multiDexKeepProguard)

Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.

abstract @NonNull Object
setProguardFiles(@NonNull Iterable<@NonNull ?> proguardFileIterable)

Replaces the ProGuard configuration files.

abstract void
shaders(
    @ExtensionFunctionType @NonNull Function1<@NonNull ShadersUnit> action
)

Configure the shader compiler options.

abstract @NonNull Object

Adds a proguard rule file to be used when processing test code.

abstract @NonNull Object

Adds proguard rule files to be used when processing test code.

Public methods

getApplicationId

abstract String getApplicationId()

The application ID.

See Set the Application ID

getMaxSdk

abstract Integer getMaxSdk()

The maxSdkVersion, or null if not specified. This is only the value set on this produce flavor.

See uses-sdk element documentation.

getTargetSdk

abstract Integer getTargetSdk()

The target SDK version. Setting this it will override previous calls of targetSdk and targetSdkPreview setters. Only one of targetSdk and targetSdkPreview should be set.

See uses-sdk element documentation.

getTargetSdkPreview

abstract String getTargetSdkPreview()

The target SDK version. Setting this it will override previous calls of targetSdk and targetSdkPreview setters. Only one of targetSdk and targetSdkPreview should be set.

See uses-sdk element documentation.

getVersionCode

abstract Integer getVersionCode()

Version code.

See Versioning Your Application

getVersionName

abstract String getVersionName()

Version name.

See Versioning Your Application

maxSdkVersion

abstract void maxSdkVersion(int maxSdkVersion)

setApplicationId

abstract void setApplicationId(String applicationId)

The application ID.

See Set the Application ID

setMaxSdk

abstract void setMaxSdk(Integer maxSdk)

The maxSdkVersion, or null if not specified. This is only the value set on this produce flavor.

See uses-sdk element documentation.

setTargetSdk

abstract void setTargetSdk(Integer targetSdk)

The target SDK version. Setting this it will override previous calls of targetSdk and targetSdkPreview setters. Only one of targetSdk and targetSdkPreview should be set.

See uses-sdk element documentation.

setTargetSdkPreview

abstract void setTargetSdkPreview(String targetSdkPreview)

The target SDK version. Setting this it will override previous calls of targetSdk and targetSdkPreview setters. Only one of targetSdk and targetSdkPreview should be set.

See uses-sdk element documentation.

setTargetSdkVersion

abstract void setTargetSdkVersion(String targetSdkVersion)

setVersionCode

abstract void setVersionCode(Integer versionCode)

Version code.

See Versioning Your Application

setVersionName

abstract void setVersionName(String versionName)

Version name.

See Versioning Your Application

targetSdkVersion

abstract void targetSdkVersion(int targetSdkVersion)

targetSdkVersion

abstract void targetSdkVersion(String targetSdkVersion)