ApplicationVariantDimension
interface ApplicationVariantDimension : VariantDimension
Known Direct Subclasses
ApplicationBaseFlavor |
|
ApplicationBuildType |
Build types define certain properties that Gradle uses when building and packaging your app, and
are typically configured for different stages of your development lifecycle.
|
|
Known Indirect Subclasses
|
Shared properties between DSL objects that contribute to an application variant.
That is, ApplicationBuildType and ApplicationProductFlavor and ApplicationDefaultConfig.
Summary
Inherited functions
|
From class VariantDimension
Unit |
addManifestPlaceholders(manifestPlaceholders: Map<String, Any>)
Adds manifest placeholders.
See
Inject Build Variables into the Manifest.
|
Unit |
buildConfigField(type: String, name: String, value: String)
Adds a new field to the generated BuildConfig class.
The field is generated as: <type> <name> = <value>;
This means each of these must have valid Java content. If the type is a String, then the
value should include quotes.
|
Unit |
externalNativeBuild(action: ExternalNativeBuildOptions.() -> Unit)
Encapsulates per-variant CMake and ndk-build configurations for your external native build.
To learn more, see
Add C and C++ Code to Your Project.
|
Unit |
javaCompileOptions(action: JavaCompileOptions.() -> Unit)
Options for configuring Java compilation.
|
Unit |
ndk(action: Ndk.() -> Unit)
Encapsulates per-variant configurations for the NDK, such as ABI filters.
|
Any |
proguardFile(proguardFile: Any)
Adds a new ProGuard configuration file.
proguardFile getDefaultProguardFile('proguard-android.txt')
There are two ProGuard rules files that ship with the Android plugin and are used by
default:
- proguard-android.txt
- proguard-android-optimize.txt
proguard-android-optimize.txt is identical to proguard-android.txt ,
except with optimizations enabled. You can use getDefaultProguardFileString
to return the full path of the files.
This method has a return value for legacy reasons.
|
Any |
proguardFiles(vararg files: Any)
Adds new ProGuard configuration files.
There are two ProGuard rules files that ship with the Android plugin and are used by
default:
- proguard-android.txt
- proguard-android-optimize.txt
proguard-android-optimize.txt is identical to proguard-android.txt ,
except with optimizations enabled. You can use getDefaultProguardFileString
to return the full path of the files.
This method has a return value for legacy reasons.
|
Unit |
resValue(type: String, name: String, value: String)
Adds a new generated resource.
This is equivalent to specifying a resource in res/values.
See Resource Types.
|
Void? |
setManifestPlaceholders(manifestPlaceholders: Map<String, Any>)
|
Any |
setProguardFiles(proguardFileIterable: Iterable<*>)
Replaces the ProGuard configuration files.
This method has a return value for legacy reasons.
|
Unit |
shaders(action: Shaders.() -> Unit)
Configure the shader compiler options.
|
Any |
testProguardFile(proguardFile: Any)
Adds a proguard rule file to be used when processing test code.
Test code needs to be processed to apply the same obfuscation as was done to main code.
This method has a return value for legacy reasons.
|
Any |
testProguardFiles(vararg proguardFiles: Any)
Adds proguard rule files to be used when processing test code.
Test code needs to be processed to apply the same obfuscation as was done to main code.
This method has a return value for legacy reasons.
|
|
Properties
|
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.
|
Properties
applicationIdSuffix
abstract var applicationIdSuffix: String?
Application id suffix. It is appended to the "base" application id when calculating the final
application id for a variant.
In case there are product flavor dimensions specified, the final application id suffix
will contain the suffix from the default product flavor, followed by the suffix from product
flavor of the first dimension, second dimension and so on. All of these will have a dot in
between e.g. "defaultSuffix.dimension1Suffix.dimensions2Suffix".
multiDexEnabled
abstract var multiDexEnabled: Boolean?
Returns whether multi-dex is enabled.
This can be null if the flag is not set, in which case the default value is used.
signingConfig
abstract var signingConfig: ApkSigningConfig?
The associated signing config or null if none are set on the variant dimension.
versionNameSuffix
abstract var versionNameSuffix: String?
Version name suffix. It is appended to the "base" version name when calculating the final
version name for a variant.
In case there are product flavor dimensions specified, the final version name suffix will
contain the suffix from the default product flavor, followed by the suffix from product
flavor of the first dimension, second dimension and so on.