LibraryDeclarativeDefinition

Added in 9.5.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<String, Any>

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.5.0-alpha07
@Incubating
fun NamedDomainObjectContainer<DeclarativeLibraryBuildType>.debug(
    action: DeclarativeLibraryBuildType.() -> Unit
): Unit

release

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

Public properties

aidlPackagedList

Added in 9.5.0-alpha07
val aidlPackagedList: MutableCollection<String>?

Aidl files to package in the aar.

androidResources

Added in 9.5.0-alpha07
val androidResources: LibraryAndroidResources

Specifies options related to the processing of Android Resources.

buildFeatures

Added in 9.5.0-alpha07
val buildFeatures: LibraryBuildFeatures

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

buildTypes

Added in 9.5.0-alpha07
val buildTypes: NamedDomainObjectContainer<DeclarativeLibraryBuildType>

Encapsulates all build type configurations for this project.

compileOptions

Added in 9.5.0-alpha07
val compileOptions: CompileOptions

Specifies Java compiler options.

composeOptions

Added in 9.5.0-alpha07
val composeOptions: ComposeOptions

dataBinding

Added in 9.5.0-alpha07
val dataBinding: DataBinding

Specifies options for the Data Binding Library.

defaultConfig

Added in 9.5.0-alpha07
val defaultConfig: LibraryDefaultConfig

Specifies defaults for variant properties.

dependencies

Added in 9.5.0-alpha07
val dependencies: DependenciesExtension

externalNativeBuild

Added in 9.5.0-alpha07
val externalNativeBuild: ExternalNativeBuild

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

installation

Added in 9.5.0-alpha07
val installation: LibraryInstallation

Specifies options for the Android Debug Bridge (ADB).

lint

Added in 9.5.0-alpha07
val lint: Lint

Specifies options for the lint tool.

packaging

Added in 9.5.0-alpha07
val packaging: Packaging

prefab

Added in 9.5.0-alpha07
val prefab: NamedDomainObjectContainer<Prefab>

container of Prefab options

productFlavors

Added in 9.5.0-alpha07
val productFlavors: NamedDomainObjectContainer<DeclarativeLibraryFlavor>

Encapsulates all product flavors configurations for this project.

publishing

Added in 9.5.0-alpha07
val publishing: LibraryPublishing

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

signingConfigs

Added in 9.5.0-alpha07
val signingConfigs: NamedDomainObjectContainer<ApkSigningConfig>

Encapsulates signing configurations.

sourceSets

Added in 9.5.0-alpha07
val sourceSets: NamedDomainObjectContainer<AndroidLibrarySourceSet>

Encapsulates source set configurations for all variants.

splits

Added in 9.5.0-alpha07
val splits: Splits

Specifies configurations for building multiple APKs or APK splits.

testCoverage

Added in 9.5.0-alpha07
val testCoverage: TestCoverage

Configure the gathering of code-coverage from tests.

testOptions

Added in 9.5.0-alpha07
val testOptions: TestOptions

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

viewBinding

Added in 9.5.0-alpha07
val viewBinding: ViewBinding

Specifies options for the View Binding Library.