DynamicFeatureVariantDimension

@Incubating interface DynamicFeatureVariantDimension : VariantDimension

Summary

Inherited functions

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.

Inherited properties

ExternalNativeBuildOptions externalNativeBuild

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.

JavaCompileOptions javaCompileOptions

Options for configuring Java compilation.

MutableMap<String, Any> manifestPlaceholders

The manifest placeholders.

See Inject Build Variables into the Manifest.

File? multiDexKeepFile

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

Classes specified in the file are appended to the main dex classes computed using aapt.

If set, the file should contain one class per line, in the following format: com/example/MyClass.class

File? multiDexKeepProguard

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

If set, rules from this file are used in combination with the default rules used by the build system.

Ndk ndk

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

MutableList<File> proguardFiles

Specifies the ProGuard configuration files that the plugin should use.

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.

Shaders shaders

Options for configuring the shader compiler.

MutableList<File> testProguardFiles

The collection of 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.