LibraryDeclarativeDefinition

Added in 9.2.0-alpha07

@Incubating
interface LibraryDeclarativeDefinition : CommonDeclarativeDefinition, TestedDeclarativeDefinition, Definition


A declarative definition for the Android Library Gradle Plugin.

This interface contains all properties and functions from LibraryExtension and its parent interfaces.

Summary

Public properties

MutableCollection<String>?

Aidl files to package in the aar.

LibraryAndroidResources

Specifies options related to the processing of Android Resources.

LibraryBuildFeatures

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

NamedDomainObjectContainer<DeclarativeLibraryBuildType>

Encapsulates all build type configurations for this project.

CompileOptions

Specifies Java compiler options.

ComposeOptions
DataBinding

Specifies options for the Data Binding Library.

LibraryDefaultConfig

Specifies defaults for variant properties.

DependenciesExtension
ExternalNativeBuild

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

LibraryInstallation

Specifies options for the Android Debug Bridge (ADB).

Lint

Specifies options for the lint tool.

Packaging
NamedDomainObjectContainer<Prefab>

container of Prefab options

NamedDomainObjectContainer<DeclarativeLibraryFlavor>

Encapsulates all product flavors configurations for this project.

LibraryPublishing

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

NamedDomainObjectContainer<ApkSigningConfig>

Encapsulates signing configurations.

NamedDomainObjectContainer<AndroidLibrarySourceSet>

Encapsulates source set configurations for all variants.

Splits

Specifies configurations for building multiple APKs or APK splits.

TestCoverage

Configure the gathering of code-coverage from tests.

TestOptions

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

ViewBinding

Specifies options for the View Binding Library.

Inherited functions

From com.android.build.api.dsl.CommonDeclarativeDefinition
File
Unit

Includes the specified library to the classpath.

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

Inherited properties

From com.android.build.api.dsl.CommonDeclarativeDefinition
String

Specifies the version of the SDK Build Tools to use.

Int?

Specifies the API level to compile your project against.

Boolean

Enables the compilation of Kotlin sources.

MutableMap<StringAny>

Additional per module experimental properties.

MutableList<String>

Specifies the names of product flavor dimensions for this project.

String?

The namespace of the generated R and BuildConfig classes.

String?

Requires the specified path to NDK be used.

String

Requires the specified NDK version to be used.

String?

Specifies this project's resource prefix to Android Studio for editor features.

From com.android.build.api.dsl.TestedDeclarativeDefinition
String

Specifies the build type that the plugin should use to test the module.

TestFixtures

Options to configure the test fixtures.

String?

The namespace used by the android test and unit test components.

Public functions

debug

Added in 9.2.0-alpha07
@Incubating
fun NamedDomainObjectContainer<DeclarativeLibraryBuildType>.debug(
    action: DeclarativeLibraryBuildType.() -> Unit
): Unit

release

Added in 9.2.0-alpha07
@Incubating
fun NamedDomainObjectContainer<DeclarativeLibraryBuildType>.release(
    action: DeclarativeLibraryBuildType.() -> Unit
): Unit

Public properties

aidlPackagedList

Added in 9.2.0-alpha07
val aidlPackagedListMutableCollection<String>?

Aidl files to package in the aar.

androidResources

Added in 9.2.0-alpha07
val androidResourcesLibraryAndroidResources

Specifies options related to the processing of Android Resources.

buildFeatures

Added in 9.2.0-alpha07
val buildFeaturesLibraryBuildFeatures

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

buildTypes

Added in 9.2.0-alpha07
val buildTypesNamedDomainObjectContainer<DeclarativeLibraryBuildType>

Encapsulates all build type configurations for this project.

compileOptions

Added in 9.2.0-alpha07
val compileOptionsCompileOptions

Specifies Java compiler options.

composeOptions

Added in 9.2.0-alpha07
val composeOptionsComposeOptions

dataBinding

Added in 9.2.0-alpha07
val dataBindingDataBinding

Specifies options for the Data Binding Library.

defaultConfig

Added in 9.2.0-alpha07
val defaultConfigLibraryDefaultConfig

Specifies defaults for variant properties.

dependencies

Added in 9.2.0-alpha07
val dependenciesDependenciesExtension

externalNativeBuild

Added in 9.2.0-alpha07
val externalNativeBuildExternalNativeBuild

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

installation

Added in 9.2.0-alpha07
val installationLibraryInstallation

Specifies options for the Android Debug Bridge (ADB).

lint

Added in 9.2.0-alpha07
val lintLint

Specifies options for the lint tool.

packaging

Added in 9.2.0-alpha07
val packagingPackaging

prefab

Added in 9.2.0-alpha07
val prefabNamedDomainObjectContainer<Prefab>

container of Prefab options

productFlavors

Added in 9.2.0-alpha07
val productFlavorsNamedDomainObjectContainer<DeclarativeLibraryFlavor>

Encapsulates all product flavors configurations for this project.

publishing

Added in 9.2.0-alpha07
val publishingLibraryPublishing

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

signingConfigs

Added in 9.2.0-alpha07
val signingConfigsNamedDomainObjectContainer<ApkSigningConfig>

Encapsulates signing configurations.

sourceSets

Added in 9.2.0-alpha07
val sourceSetsNamedDomainObjectContainer<AndroidLibrarySourceSet>

Encapsulates source set configurations for all variants.

splits

Added in 9.2.0-alpha07
val splitsSplits

Specifies configurations for building multiple APKs or APK splits.

testCoverage

Added in 9.2.0-alpha07
val testCoverageTestCoverage

Configure the gathering of code-coverage from tests.

testOptions

Added in 9.2.0-alpha07
val testOptionsTestOptions

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

viewBinding

Added in 9.2.0-alpha07
val viewBindingViewBinding

Specifies options for the View Binding Library.