# gradle

# Gradle Kotlin DSL Reference

Gradle’s Kotlin DSL provides an enhanced editing experience in supported IDEs, with superior content assistance, refactoring, documentation, and more. For an introduction see the Kotlin DSL Primer.

The Kotlin DSL is implemented on top of Gradle’s Java API. Many of the objects, functions, and properties you use in your build scripts come from the Gradle API and the APIs of the applied plugins. This reference covers both the Kotlin DSL and the Java API, but it doesn't include functionality provided by external plugins.

The main package of the Kotlin DSL is org.gradle.kotlin.dsl. All members of this package are implicitly imported and readily available in `.gradle.kts` scripts in addition to the Java API default imports.

# Gradle Kotlin DSL Reference

Gradle’s Kotlin DSL provides an enhanced editing experience in supported IDEs, with superior content assistance, refactoring, documentation, and more. For an introduction see the Kotlin DSL Primer.

The Kotlin DSL is implemented on top of Gradle’s Java API. Many of the objects, functions, and properties you use in your build scripts come from the Gradle API and the APIs of the applied plugins. This reference covers both the Kotlin DSL and the Java API, but it doesn't include functionality provided by external plugins.

The main package of the Kotlin DSL is org.gradle.kotlin.dsl. All members of this package are implicitly imported and readily available in `.gradle.kts` scripts in addition to the Java API default imports.

## Packages

org.gradle
Link copied to clipboard
API
org.gradle.api
Link copied to clipboard
API

Gradle's build language API, which is available from your build files. Location of the main interfaces involved in build scripts.

org.gradle.api.artifacts
Link copied to clipboard
API

Classes for declaring and using artifacts and artifact dependencies.

org.gradle.api.artifacts.capability
Link copied to clipboard
API

Classes related to requesting and providing capabilities of variants.

org.gradle.api.artifacts.component
Link copied to clipboard
API

Classes that provide meta-data about software components.

org.gradle.api.artifacts.dsl
Link copied to clipboard
API

Classes used in the artifact DSL.

org.gradle.api.artifacts.ivy
Link copied to clipboard
API

Classes for declaring and using Ivy modules.

org.gradle.api.artifacts.maven
Link copied to clipboard
API

Classes for declaring and using Maven modules.

org.gradle.api.artifacts.query
Link copied to clipboard
API

Classes used for querying the artifacts.

org.gradle.api.artifacts.repositories
Link copied to clipboard
API

Classes for declaring and using artifact repositories.

org.gradle.api.artifacts.result
Link copied to clipboard
API

Classes that compose the resolution result

org.gradle.api.artifacts.transform
Link copied to clipboard
API

Provides classes, interfaces and annotations for registering and implementing artifact transforms.

org.gradle.api.artifacts.type
Link copied to clipboard
API

Types related to artifact type definitions.

org.gradle.api.artifacts.verification
Link copied to clipboard
API

Dependency verification related configuration classes

org.gradle.api.attributes
Link copied to clipboard
API

Classes for dealing with configuration and artifact attributes.

org.gradle.api.attributes.java
Link copied to clipboard
API
org.gradle.api.attributes.plugin
Link copied to clipboard
API

Attributes specific to Gradle's plugin system.

org.gradle.api.cache
Link copied to clipboard
API

Classes for configuring cache-related components.

org.gradle.api.capabilities
Link copied to clipboard
API

Classes for dealing with capabilities.

org.gradle.api.component
Link copied to clipboard
API

Types for declaring and using Software Components.

org.gradle.api.configuration
Link copied to clipboard
API

Classes related to build configuration.

org.gradle.api.credentials
Link copied to clipboard
API

general credentials related classes.

org.gradle.api.distribution
Link copied to clipboard
API

The main interfaces and classes of the distribution plugin.

org.gradle.api.distribution.plugins
Link copied to clipboard
API

The distribution plugin itself.

org.gradle.api.execution
Link copied to clipboard
API

Classes for managing and monitoring build execution.

org.gradle.api.file
Link copied to clipboard
API

Classes for working with files.

org.gradle.api.flow
Link copied to clipboard
API

Gradle Flow API.

org.gradle.api.initialization
Link copied to clipboard
API

Classes for managing and monitoring build initialization.

org.gradle.api.initialization.definition
Link copied to clipboard
API

Types related to the build definition for included builds.

org.gradle.api.initialization.dsl
Link copied to clipboard
API

Classes used in the initialization DSL.

org.gradle.api.initialization.resolve
Link copied to clipboard
API

Classes for managing cross-project dependency resolution.

org.gradle.api.invocation
Link copied to clipboard
API

Classes for invoking and monitoring gradle builds.

org.gradle.api.java.archives
Link copied to clipboard
API

Classes for working with JAR manifests.

org.gradle.api.jvm
Link copied to clipboard
API

Interfaces for configuring the Java Platform Module System (JPMS).

org.gradle.api.launcher.cli
Link copied to clipboard
API

Interfaces for configuring the cli client.

org.gradle.api.logging
Link copied to clipboard
API

Classes for managing logging in Gradle.

org.gradle.api.logging.configuration
Link copied to clipboard
API

Classes for logging configuration.

org.gradle.api.model
Link copied to clipboard
API

Classes that operate on the Gradle model.

org.gradle.api.plugins
Link copied to clipboard
API
org.gradle.api.plugins.antlr
Link copied to clipboard
API

A org.gradle.api.Plugin for generating parsers from Antlr grammars.

org.gradle.api.plugins.catalog
Link copied to clipboard
API
org.gradle.api.plugins.jvm
Link copied to clipboard
API

Dependency modifiers that can access platform and enforced platforms in `dependencies` blocks.

org.gradle.api.plugins.quality
Link copied to clipboard
API

Plugins which measure and enforce code quality.

org.gradle.api.plugins.scala
Link copied to clipboard
API

A org.gradle.api.Plugin which compiles and tests Scala sources.

org.gradle.api.problems
Link copied to clipboard
API

new Problems API

org.gradle.api.project
Link copied to clipboard
API

org.gradle.api.Project specific APIs.

org.gradle.api.provider
Link copied to clipboard
API

The interfaces for value providers.

org.gradle.api.publish
Link copied to clipboard
API

Classes that deal with publishing artifacts.

org.gradle.api.publish.ivy
Link copied to clipboard
API

Types that deal with publishing in the Ivy format.

org.gradle.api.publish.ivy.plugins
Link copied to clipboard
API

Plugins for Ivy publishing.

org.gradle.api.publish.ivy.tasks
Link copied to clipboard
API

Tasks for Ivy publishing.

org.gradle.api.publish.maven
Link copied to clipboard
API

Types that deal with publishing in the Maven format.

org.gradle.api.publish.maven.plugins
Link copied to clipboard
API

Plugins for publishing in the Maven format.

org.gradle.api.publish.maven.tasks
Link copied to clipboard
API

Tasks for publishing in the Maven format.

org.gradle.api.publish.plugins
Link copied to clipboard
API

Publishing plugin.

org.gradle.api.publish.tasks
Link copied to clipboard
API

Tasks used for publishing to a binary repository.

org.gradle.api.reflect
Link copied to clipboard
API

Classes and API for the reflection and types.

org.gradle.api.reporting
Link copied to clipboard
API

Classes for reporting

org.gradle.api.reporting.components
Link copied to clipboard
API

Reporting components used by software reports.

org.gradle.api.reporting.dependencies
Link copied to clipboard
API

Types responsible for generating dependency reports.

org.gradle.api.reporting.dependents
Link copied to clipboard
API

Types representing dependent components and rendered for them.

org.gradle.api.reporting.model
Link copied to clipboard
API

Configuration model reporting tasks.

org.gradle.api.reporting.plugins
Link copied to clipboard
API

Plugins for reporting

org.gradle.api.resources
Link copied to clipboard
API

Interfaces and API for the 'Resources' concept.

org.gradle.api.services
Link copied to clipboard
API

Types for defining and using build services.

org.gradle.api.specs
Link copied to clipboard
API

Classes for defining general purpose criteria.

org.gradle.api.tasks
Link copied to clipboard
API

The standard org.gradle.api.Task implementations.

org.gradle.api.tasks.ant
Link copied to clipboard
API

The Ant integration org.gradle.api.Task implementations.

org.gradle.api.tasks.application
Link copied to clipboard
API

Tasks for creating and running java applications.

org.gradle.api.tasks.bundling
Link copied to clipboard
API
org.gradle.api.tasks.compile
Link copied to clipboard
API

The compilation org.gradle.api.Task implementations.

org.gradle.api.tasks.diagnostics
Link copied to clipboard
API

The diagnostic org.gradle.api.Task implementations.

org.gradle.api.tasks.diagnostics.artifact.transforms
Link copied to clipboard
API
org.gradle.api.tasks.diagnostics.configurations
Link copied to clipboard
API

Diagnostic tasks which report information about configurations.

org.gradle.api.tasks.incremental
Link copied to clipboard
API

API classes for implementing incremental tasks.

org.gradle.api.tasks.javadoc
Link copied to clipboard
API

The documentation generation org.gradle.api.Task implementations.

org.gradle.api.tasks.options
Link copied to clipboard
API

Annotations for exposing task properties as command line options.

org.gradle.api.tasks.scala
Link copied to clipboard
API
org.gradle.api.tasks.testing
Link copied to clipboard
API

The unit testing org.gradle.api.Task implementations.

org.gradle.api.tasks.testing.junit
Link copied to clipboard
API

JUnit specific testing classes.

org.gradle.api.tasks.testing.junitplatform
Link copied to clipboard
API
org.gradle.api.tasks.testing.logging
Link copied to clipboard
API

Types related to logging of test related information to the console.

org.gradle.api.tasks.testing.testng
Link copied to clipboard
API

TestNG specific testing classes.

org.gradle.api.tasks.util
Link copied to clipboard
API

Utility classes used by the standard task implementations.

org.gradle.api.tasks.wrapper
Link copied to clipboard
API

The Gradle wrapper org.gradle.api.Task.

org.gradle.api.toolchain.management
Link copied to clipboard
API

APIs to influence how toolchains are resolved.

org.gradle.authentication
Link copied to clipboard
API

Classes related to transport authentication protocols.

org.gradle.authentication.aws
Link copied to clipboard
API

Classes related to transport authentication protocols for S3.

org.gradle.authentication.http
Link copied to clipboard
API

Classes related to transport authentication protocols for HTTP.

org.gradle.build.event
Link copied to clipboard
API

Types for receiving build events.

org.gradle.buildconfiguration.tasks
Link copied to clipboard
API

Public types for updating the Gradle Daemon JVM criteria.

org.gradle.buildinit
Link copied to clipboard
API

Build init plugins and tasks. This powers "gradle init".

org.gradle.buildinit.plugins
Link copied to clipboard
API

Build init plugins.

org.gradle.buildinit.specs
Link copied to clipboard
API

Provides the API that plugins can use to contribute additional types of builds to the `init` task.

org.gradle.buildinit.tasks
Link copied to clipboard
API

Build init plugins.

org.gradle.caching
Link copied to clipboard
API
org.gradle.caching.configuration
Link copied to clipboard
API

Classes for configuring build caches.

org.gradle.caching.http
Link copied to clipboard
API

Classes for HTTP build cache service.

org.gradle.caching.local
Link copied to clipboard
API

Classes for local build cache services.

org.gradle.concurrent
Link copied to clipboard
API

Classes related to Gradle parallelism and concurrency.

org.gradle.external.javadoc
Link copied to clipboard
API

Classes to run Javadoc.

org.gradle.ide.visualstudio
Link copied to clipboard
API

Model classes for visual studio.

org.gradle.ide.visualstudio.plugins
Link copied to clipboard
API

Plugins for Visual Studio integration.

org.gradle.ide.visualstudio.tasks
Link copied to clipboard
API

Task classes for visual studio.

org.gradle.ide.xcode
Link copied to clipboard
API

Model classes for XCode.

org.gradle.ide.xcode.plugins
Link copied to clipboard
API

Plugins for XCode integration.

org.gradle.ide.xcode.tasks
Link copied to clipboard
API

Task classes for XCode.

org.gradle.ivy
Link copied to clipboard
API

Component types for Ivy modules.

org.gradle.jvm
Link copied to clipboard
API

Types for support of JVM runtime.

org.gradle.jvm.application.scripts
Link copied to clipboard
API

Classes that enable JVM application script generation.

org.gradle.jvm.application.tasks
Link copied to clipboard
API

Tasks for the JVM application plugin.

org.gradle.jvm.tasks
Link copied to clipboard
API

Tasks that add support for JVM runtime.

org.gradle.jvm.toolchain
Link copied to clipboard
API
org.gradle.kotlin.dsl
Link copied to clipboard
DSL

The `org.gradle.kotlin.dsl` package contains the Gradle Kotlin DSL public API.

org.gradle.kotlin.dsl.precompile
Link copied to clipboard
DSL
org.gradle.language
Link copied to clipboard
API

Model classes for managing language sources.

org.gradle.language.assembler
Link copied to clipboard
API

Model classes for building from Assembler language sources.

org.gradle.language.assembler.plugins
Link copied to clipboard
API

Plugins for building from Assembler language sources.

org.gradle.language.assembler.tasks
Link copied to clipboard
API

Tasks for assembling Assembler sources for a native runtime.

org.gradle.language.base
Link copied to clipboard
API

General purpose types for language support.

org.gradle.language.base.artifact
Link copied to clipboard
API

Classes representing artifacts relevant to languages in general.

org.gradle.language.base.compile
Link copied to clipboard
API

General purpose types for related to compiling.

org.gradle.language.base.plugins
Link copied to clipboard
API

Base plugins for language support.

org.gradle.language.base.sources
Link copied to clipboard
API

General purpose types for language sources support.

org.gradle.language.c
Link copied to clipboard
API

Model classes for building from C language sources.

org.gradle.language.c.plugins
Link copied to clipboard
API

Plugins for building from C language sources.

org.gradle.language.c.tasks
Link copied to clipboard
API

Tasks for compiling C sources for a native runtime.

org.gradle.language.cpp
Link copied to clipboard
API

Model classes for building from C++ language sources.

org.gradle.language.cpp.plugins
Link copied to clipboard
API

Plugins for building from C++ language sources.

org.gradle.language.cpp.tasks
Link copied to clipboard
API

Tasks for compiling C++ sources for a native runtime.

org.gradle.language.java.artifact
Link copied to clipboard
API

Classes representing artifacts relevant to the Java language.

org.gradle.language.jvm.tasks
Link copied to clipboard
API

Tasks for support for JVM languages.

org.gradle.language.nativeplatform
Link copied to clipboard
API
org.gradle.language.nativeplatform.tasks
Link copied to clipboard
API

Base classes for native language compile tasks.

org.gradle.language.objectivec
Link copied to clipboard
API

Model classes for building from Objective-C language sources.

org.gradle.language.objectivec.plugins
Link copied to clipboard
API

Plugins for building from Objective-C language sources.

org.gradle.language.objectivec.tasks
Link copied to clipboard
API

Tasks for compiling Objective-C sources for a native runtime.

org.gradle.language.objectivecpp
Link copied to clipboard
API

Model classes for building from Objective-C++ language sources.

org.gradle.language.objectivecpp.plugins
Link copied to clipboard
API

Plugins for building from Objective-C++ language sources.

org.gradle.language.objectivecpp.tasks
Link copied to clipboard
API

Tasks for compiling Objective-C++ sources for a native runtime.

org.gradle.language.plugins
Link copied to clipboard
API

Base plugins for the native languages.

org.gradle.language.rc
Link copied to clipboard
API

Model classes for building from Windows Resource scripts.

org.gradle.language.rc.plugins
Link copied to clipboard
API

Plugins for building from Windows Resource scripts.

org.gradle.language.rc.tasks
Link copied to clipboard
API

Tasks for compiling Windows resources for a native runtime.

org.gradle.language.scala.tasks
Link copied to clipboard
API

Tasks that add support for Scala language.

org.gradle.language.swift
Link copied to clipboard
API

Model classes for building from Swift language sources.

org.gradle.language.swift.plugins
Link copied to clipboard
API

Plugins for building from Swift language sources.

org.gradle.language.swift.tasks
Link copied to clipboard
API

Tasks for compiling Swift sources for a native runtime.

org.gradle.maven
Link copied to clipboard
API

Component types for Maven modules.

org.gradle.model
Link copied to clipboard
API

Classes that operate upon the Gradle model.

org.gradle.nativeplatform
Link copied to clipboard
API

Classes that model aspects of native component projects.

org.gradle.nativeplatform.platform
Link copied to clipboard
API

Classes that allow defining a native binary platform.

org.gradle.nativeplatform.plugins
Link copied to clipboard
API

Plugins for building native component projects.

org.gradle.nativeplatform.tasks
Link copied to clipboard
API

Tasks for building native component projects.

org.gradle.nativeplatform.test
Link copied to clipboard
API

API classes for testing native binaries.

org.gradle.nativeplatform.test.cpp
Link copied to clipboard
API

API classes for C++ test integration.

org.gradle.nativeplatform.test.cpp.plugins
Link copied to clipboard
API

Plugins for C++ test integration.

org.gradle.nativeplatform.test.cunit
Link copied to clipboard
API

API classes for cunit integration.

org.gradle.nativeplatform.test.cunit.plugins
Link copied to clipboard
API

Plugins for cunit testing.

org.gradle.nativeplatform.test.cunit.tasks
Link copied to clipboard
API

Tasks for cunit integration.

org.gradle.nativeplatform.test.googletest
Link copied to clipboard
API

API classes for Google Test integration.

org.gradle.nativeplatform.test.googletest.plugins
Link copied to clipboard
API

Plugins for Google Test testing.

org.gradle.nativeplatform.test.plugins
Link copied to clipboard
API

Plugin classes for generic support for testing native binaries.

org.gradle.nativeplatform.test.tasks
Link copied to clipboard
API

Tasks for test execution.

org.gradle.nativeplatform.test.xctest
Link copied to clipboard
API

Model classes for the XCTest plugins.

org.gradle.nativeplatform.test.xctest.plugins
Link copied to clipboard
API

Plugins for XCTest testing.

org.gradle.nativeplatform.test.xctest.tasks
Link copied to clipboard
API

Tasks for XCTest execution.

org.gradle.nativeplatform.toolchain
Link copied to clipboard
API

Classes that allow C++ tool chains to be configured.

org.gradle.nativeplatform.toolchain.plugins
Link copied to clipboard
API

Built-in tool chain support.

org.gradle.normalization
Link copied to clipboard
API

Interfaces and API for input normalization.

org.gradle.platform
Link copied to clipboard
API

Types to define build environment.

org.gradle.platform.base
Link copied to clipboard
API

General purpose types for runtime support.

org.gradle.platform.base.binary
Link copied to clipboard
API

General purpose types for binary support.

org.gradle.platform.base.component
Link copied to clipboard
API

General purpose types for library support.

org.gradle.platform.base.plugins
Link copied to clipboard
API

Base plugins for software model support.

org.gradle.plugin.devel
Link copied to clipboard
API

Classes for assisting with plugin development.

org.gradle.plugin.devel.plugins
Link copied to clipboard
API

Plugins for assisting with plugin development.

org.gradle.plugin.devel.tasks
Link copied to clipboard
API

Tasks for assisting with plugin development.

org.gradle.plugin.management
Link copied to clipboard
API

APIs to influence how plugins are resolved.

org.gradle.plugin.use
Link copied to clipboard
API

Classes for managing plugin resolution and use.

org.gradle.plugins.ear
Link copied to clipboard
API

Support for generating EAR archives in a Gradle build

org.gradle.plugins.ear.descriptor
Link copied to clipboard
API

Classes for working with EAR deployment descriptors.

org.gradle.plugins.ide
Link copied to clipboard
API

General purpose IDE types.

org.gradle.plugins.ide.api
Link copied to clipboard
API

General ide plugin api.

org.gradle.plugins.ide.eclipse
Link copied to clipboard
API

A org.gradle.api.Plugin for generating Eclipse files.

org.gradle.plugins.ide.eclipse.model
Link copied to clipboard
API

Classes for the model used by the eclipse plugins.

org.gradle.plugins.ide.idea
Link copied to clipboard
API
org.gradle.plugins.ide.idea.model
Link copied to clipboard
API
org.gradle.plugins.signing
Link copied to clipboard
API

The signing plugin.

org.gradle.plugins.signing.signatory
Link copied to clipboard
API

The signing plugin signatory types.

org.gradle.plugins.signing.signatory.pgp
Link copied to clipboard
API

PGP signing support.

org.gradle.plugins.signing.type
Link copied to clipboard
API

The signing plugin signature types.

org.gradle.plugins.signing.type.pgp
Link copied to clipboard
API

PGP signing support.

org.gradle.process
Link copied to clipboard
API

Classes for executing system and Java processes.

org.gradle.swiftpm
Link copied to clipboard
API

Model classes that describe a Swift Package Manager package.

org.gradle.swiftpm.plugins
Link copied to clipboard
API

Plugins that produce Swift Package Manager manifests from the Gradle model.

org.gradle.swiftpm.tasks
Link copied to clipboard
API

Tasks that produce Swift Package Manager manifests from the Gradle model.

org.gradle.testfixtures
Link copied to clipboard
API
org.gradle.testing.base
Link copied to clipboard
API

General purpose types for test suite support.

org.gradle.testing.base.plugins
Link copied to clipboard
API
org.gradle.testing.jacoco.plugins
Link copied to clipboard
API

Plugins to work with the JaCoCo code coverage library.

org.gradle.testing.jacoco.tasks
Link copied to clipboard
API

Tasks to work with the JaCoCo code coverage library.

org.gradle.testing.jacoco.tasks.rules
Link copied to clipboard
API

Implementations for Jacoco code coverage rules.

org.gradle.testkit.runner
Link copied to clipboard
API

Support for executing contrived Gradle builds for the purpose of testing build logic.

org.gradle.tooling
Link copied to clipboard
API

The main interfaces and classes of the Gradle tooling API.

org.gradle.tooling.events
Link copied to clipboard
API

The interfaces and classes related to registering for event notifications and listening to dispatched events.

org.gradle.tooling.events.configuration
Link copied to clipboard
API

Project configuration specific interfaces and classes related to event notifications.

org.gradle.tooling.events.download
Link copied to clipboard
API

File download specific interfaces and classes related to event notifications.

org.gradle.tooling.events.lifecycle
Link copied to clipboard
API

Build lifecycle interfaces and classes related to event notifications.

org.gradle.tooling.events.problems
Link copied to clipboard
API

Problem specific interfaces and classes related to event notifications.

org.gradle.tooling.events.task
Link copied to clipboard
API

Task execution specific interfaces and classes related to event notifications.

org.gradle.tooling.events.task.java
Link copied to clipboard
API

Task execution result interfaces specific to Java projects.

org.gradle.tooling.events.test
Link copied to clipboard
API

Test execution specific interfaces and classes related to event notifications.

org.gradle.tooling.events.transform
Link copied to clipboard
API

Artifact transform execution specific interfaces and classes related to event notifications.

org.gradle.tooling.events.work
Link copied to clipboard
API

Work item execution specific interfaces and classes related to event notifications.

org.gradle.tooling.exceptions
Link copied to clipboard
API

Exceptions thrown when using the tooling API.

org.gradle.tooling.model
Link copied to clipboard
API

The general-purpose tooling model types, provided by the tooling API.

org.gradle.tooling.model.build
Link copied to clipboard
API

Tooling models for the build environment, which includes information such as Gradle or Java versions.

org.gradle.tooling.model.cpp
Link copied to clipboard
API

Types that represent the tooling model for C++ projects.

org.gradle.tooling.model.eclipse
Link copied to clipboard
API

Eclipse-centric tooling models.

org.gradle.tooling.model.gradle
Link copied to clipboard
API

The tooling models for Gradle builds and projects.

org.gradle.tooling.model.idea
Link copied to clipboard
API

IntelliJ IDEA centric tooling models.

org.gradle.tooling.model.java
Link copied to clipboard
API

Java-specific details for tooling models.

org.gradle.tooling.model.kotlin.dsl
Link copied to clipboard
API

Kotlin DSL related tooling models.

org.gradle.tooling.provider.model
Link copied to clipboard
API

Interfaces and classes that allow tooling models to be made available to the tooling API client.

org.gradle.util
Link copied to clipboard
API
org.gradle.vcs
Link copied to clipboard
API

Packages for version control systems.

org.gradle.vcs.git
Link copied to clipboard
API

The API for dealing with Version Control Systems in Gradle.

org.gradle.work
Link copied to clipboard
API

Classes used for implementing units of work.

org.gradle.workers
Link copied to clipboard
API

Workers allow running pieces of work in the background, either in-process in isolated classloaders or out-of-process in reusable daemons.