ApplicationExtension

interface ApplicationExtension : CommonExtension, ApkExtension, TestedExtension


Extension for the Android Gradle Plugin Application plugin.

This is the android block when the com.android.application plugin is applied.

Only the Android Gradle Plugin should create instances of interfaces in com.android.build.api.dsl.

Summary

Public functions

Unit
Unit

Specify whether to include SDK dependency information in APKs and Bundles.

Unit

Customizes publishing build variant artifacts from app module to a Maven repository.

Public properties

MutableSet<String>

Set of asset pack subprojects to be included in the app's bundle.

Bundle
DependenciesInfo

Specify whether to include SDK dependency information in APKs and Bundles.

MutableSet<String>
ApplicationPublishing

Customizes publishing build variant artifacts from app module to a Maven repository.

Inherited functions

From class CommonExtension
@Incubating Unit

This function is deprecated. Replaced by

@Incubating Unit

This function is deprecated. Replaced by installation

Unit

Specifies options related to the processing of Android Resources.

@Incubating Unit

A list of build features that can be enabled or disabled on the Android Project.

@Incubating Unit
buildToolsVersion(buildToolsVersion: String?)

This function is deprecated. Replaced by buildToolsVersion property

Unit

Encapsulates all build type configurations for this project.

Unit

Specifies Java compiler options, such as the language level of the Java source code and generated bytecode.

Unit
compileSdkAddon(vendor: String?, name: String?, version: Int?)
@Incubating Unit
compileSdkVersion(apiLevel: Int?)

This function is deprecated. Replaced by compileSdk

@Incubating Unit

This function is deprecated. Replaced by compileSdk

@Incubating Unit
Unit

Specifies options for the Data Binding Library.

Unit

Shortcut extension method to allow easy access to the predefined debugBuildType

Unit

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

Unit

Specifies options for external native build using CMake or ndk-build.

@Incubating Unit
flavorDimensions(vararg dimensions: String?)

This function is deprecated. Replaced by flavorDimensions property

@Incubating File
Unit

Specifies options for the Android Debug Bridge (ADB), such as APK installation options.

@Incubating Unit

This function is deprecated. Renamed to testCoverage

Unit
lint(action: (@ExtensionFunctionType Lint.() -> Unit)?)

Specifies options for the lint tool.

@Incubating Unit

This function is deprecated. Renamed to lint

@Incubating Unit

Specifies options and rules that determine which files the Android plugin packages into your APK.

Unit

Encapsulates all product flavors configurations for this project.

Unit

Shortcut extension method to allow easy access to the predefined releaseBuildType

@Incubating Unit

Encapsulates signing configurations that you can apply to BuildType and ProductFlavor configurations.

@Incubating Unit

Encapsulates source set configurations for all variants.

@Incubating Unit

Specifies configurations for building multiple APKs or APK splits.

Unit

Configure the gathering of code-coverage from tests.

@Incubating Unit

Specifies options for how the Android plugin should run local and instrumented tests.

@Incubating Unit

Includes the specified library to the classpath.

@Incubating Unit
useLibrary(name: String?, required: Boolean?)

Includes the specified library to the classpath.

From class TestedExtension
Unit

Options to configure the test fixtures.

Public functions

bundle

fun bundle(action: (@ExtensionFunctionType Bundle.() -> Unit)?): Unit

dependenciesInfo

fun dependenciesInfo(action: (@ExtensionFunctionType DependenciesInfo.() -> Unit)?): Unit

Specify whether to include SDK dependency information in APKs and Bundles.

publishing

fun publishing(action: (@ExtensionFunctionType ApplicationPublishing.() -> Unit)?): Unit

Customizes publishing build variant artifacts from app module to a Maven repository.

For more information about the properties you can configure in this block, see ApplicationPublishing

Public properties

assetPacks

val assetPacksMutableSet<String>

Set of asset pack subprojects to be included in the app's bundle.

bundle

val bundleBundle

dependenciesInfo

val dependenciesInfoDependenciesInfo

Specify whether to include SDK dependency information in APKs and Bundles.

dynamicFeatures

val dynamicFeaturesMutableSet<String>

publishing

val publishingApplicationPublishing

Customizes publishing build variant artifacts from app module to a Maven repository.

For more information about the properties you can configure in this block, see ApplicationPublishing