TestVariantDimension
interface TestVariantDimension : VariantDimension
Known Direct Subclasses
TestBaseFlavor |
|
TestBuildType |
Build types define certain properties that Gradle uses when building and packaging your library,
and are typically configured for different stages of your development lifecycle.
|
|
Known Indirect Subclasses
TestDefaultConfig |
Specifies defaults for properties that the Android test plugin applies to all build variants.
|
TestProductFlavor |
Encapsulates all product flavors properties for test projects.
|
|
Shared properties between DSL objects that contribute to a separate-test-project variant.
That is, TestBuildType and TestProductFlavor and TestDefaultConfig.
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 Boolean? |
Returns whether multi-dex is enabled.
|
abstract ApkSigningConfig? |
The associated signing config or null if none are set on the variant dimension.
|
Properties
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.