Gradle Kotlin DSL

All Types

org.gradle.api.tasks.bundling.AbstractArchiveTask

AbstractArchiveTask is the base class for all archive tasks.

org.gradle.caching.configuration.AbstractBuildCache

Base implementation for build cache service configuration.

org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry

Common superclass for all ClasspathEntry instances.

org.gradle.api.tasks.compile.AbstractCompile

The base class for all JVM-based language compilation tasks.

org.gradle.api.tasks.AbstractCopyTask

AbstractCopyTask is the base class for all copy tasks.

org.gradle.api.tasks.diagnostics.AbstractDependencyReportTask

Displays the dependency tree for a configuration.

org.gradle.api.tasks.AbstractExecTask

AbstractExecTask is the base class for all exec tasks.

org.gradle.plugins.ide.eclipse.model.AbstractLibrary

Common superclass for the library elements.

org.gradle.nativeplatform.tasks.AbstractLinkTask

Base task for linking a native binary from object files and libraries.

org.gradle.language.nativeplatform.tasks.AbstractNativeCompileTask

Compiles native source files into object files.

org.gradle.language.nativeplatform.tasks.AbstractNativePCHCompileTask

Compiles native header source files into object files.

org.gradle.language.nativeplatform.tasks.AbstractNativeSourceCompileTask

Compiles native source files into object files.

org.gradle.api.tasks.compile.AbstractOptions

Base class for compilation-related options.

org.gradle.api.publish.maven.tasks.AbstractPublishToMaven

Base class for tasks that publish a org.gradle.api.publish.maven.MavenPublication.

org.gradle.api.tasks.diagnostics.AbstractReportTask

The base class for all project report tasks.

org.gradle.language.scala.tasks.AbstractScalaCompile

An abstract Scala compile task sharing common functionality for compiling scala.

org.gradle.plugins.signing.type.AbstractSignatureType

Convenience base class for SignatureType implementations.

org.gradle.plugins.signing.type.AbstractSignatureTypeProvider

Convenience base class for SignatureTypeProvider implementations.

org.gradle.api.tasks.testing.AbstractTestTask

Abstract class for all test task.

  • Support for test listeners
  • Support for reporting
  • Support for report linking in the console output

Note: This abstract class is not intended for implementation by build script or plugin authors.

org.gradle.tooling.model.eclipse.AccessRule

Access rule associated with an Eclipse classpath entry.

org.gradle.plugins.ide.eclipse.model.AccessRule

Access rule associated to a classpath entry.

org.gradle.api.Action (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.Action

Performs some action against objects of type T.

org.gradle.api.ActionConfiguration

Allows specification of configuration for some action.

The configuration is represented using zero or more initialization parameters to use when constructing an instance of the implementation class. The following types are supported:

  • String
  • Boolean
  • Integer, Long, Short and other Number subtypes.
  • java.io.File
  • A java.util.List or java.util.Set of any supported type.
  • An array of any supported type.
  • A java.util.Map with keys and values of any supported type.
  • An Enum type.
  • A Named type created using org.gradle.api.model.ObjectFactory#named(Class, String).
  • Any serializable type.

org.gradle.api.specs.AndSpec

A org.gradle.api.specs.CompositeSpec which requires all its specs to be true in order to evaluate to true. Uses lazy evaluation.

org.gradle.api.plugins.announce.AnnouncePlugin

This plugin allows to send announce messages to Twitter.

org.gradle.api.plugins.announce.AnnouncePluginExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.announce.AnnouncePluginExtension

The extension used by the AnnouncePlugin.

org.gradle.api.plugins.announce.Announcer

An Announcer allows messages to be sent.

org.gradle.api.AntBuilder

An AntBuilder allows you to use Ant from your build script.

org.gradle.api.tasks.AntBuilderAware

An AntBuilderAware represents an object which can add itself to Ant tasks, using an org.gradle.api.AntBuilder.

org.gradle.api.tasks.ant.AntTarget

A task which executes an Ant target.

org.gradle.api.plugins.antlr.AntlrPlugin

A plugin for adding Antlr support to JavaPlugin.

org.gradle.api.plugins.antlr.AntlrSourceVirtualDirectory

Contract for a Gradle "convention object" that acts as a handler for what I call a virtual directory mapping, injecting a virtual directory named 'antlr' into the project's various org.gradle.api.tasks.SourceSet.

org.gradle.api.plugins.antlr.AntlrTask

Generates parsers from Antlr grammars.

kotlin.Any (extensions in package org.gradle.kotlin.dsl)
org.gradle.jvm.tasks.api.ApiJar

Assembles an "API Jar" containing only the members of a library's public API.

This task and the Jar it produces are designed primarily for internal use in support of Gradle's "compile avoidance" performance feature. The task is automatically included in the task graph for any JVM library that declares an api { ... } specification, and the resulting Jar will automatically be placed on the compile time classpath of projects that depend on the library in lieu of the library's complete so-called "Runtime Jar".

Swapping the API Jar in for the Runtime Jar at compile time is what makes "compile avoidance" possible: because the contents of the API Jar change only when actual API changes are made, the API Jar passes Gradle's up-to-date checks, even if the implementation in the Runtime Jar has changed. Ultimately, this means that projects depending on the library in question will need to recompile potentially far less often.

In order to ensure that API Jars change as infrequently as possible, this task and its supporting classes ensure that only actual public API members are included in the API Jar, and that the methods among those members are stripped of their implementation. Because the members included in API Jars exist only for compilation purposes, they need no actual implementation, and for this reason, all such methods throw UnsupportedOperationException in the unlikely event that they are present on the classpath and invoked at runtime.

The inputs to this task are Java class files which must be provided via org.gradle.api.tasks.TaskInputs.

org.gradle.platform.base.Application

A software application.

org.gradle.platform.base.ApplicationBinarySpec

A binary produced from a `org.gradle.platform.base.ApplicationSpec`.

org.gradle.api.plugins.ApplicationPlugin

A Plugin which runs a project as a Java Application.

The plugin can be configured via its companion ApplicationPluginConvention object.

org.gradle.api.plugins.ApplicationPluginConvention

The Convention used for configuring the ApplicationPlugin.

org.gradle.platform.base.ApplicationSpec

A specification of a org.gradle.platform.base.Application.

org.gradle.api.plugins.AppliedPlugin

Represents a plugin that has been applied.

Currently just provides information about the ID of the plugin.

org.gradle.nativeplatform.platform.Architecture

A cpu architecture. Instruction Set 32-bit names 64-bit names Intel x86 "x86", "i386", "ia-32", "i686" "x86_64", "amd64", "x64", "x86-64" Intel Itanium N/A "ia-64", "ia64" Power PC "ppc" "ppc64" Sparc "sparc", "sparc32", "sparc-v8" "sparc64", "ultrasparc", "sparc-v9" ARM "arm", "arm-v7", "armv7", "arm32" "arm64", "arm-v8"

org.gradle.plugins.signing.type.pgp.ArmoredSignatureType

Armored signature type.

org.gradle.api.component.Artifact

An artifact of a software component that may be requested in the result of an artifact query.

org.gradle.api.artifacts.ArtifactCollection

A collection of artifacts resolved for a configuration. The configuration is resolved on demand when the collection is queried.

org.gradle.api.artifacts.dsl.ArtifactHandler

This class is for defining artifacts to be published and adding them to configurations. Creating publish artifacts does not mean to create an archive. What is created is a domain object which represents a file to be published and information on how it should be published (e.g. the name).

To create an publish artifact and assign it to a configuration you can use the following syntax:

<configurationName> <artifact-notation>, <artifact-notation> ... or <configurationName> <artifact-notation> { ... some code to configure the artifact }

The notation can be one of the following types:

  • PublishArtifact.
  • org.gradle.api.tasks.bundling.AbstractArchiveTask. The information for publishing the artifact is extracted from the archive task (e.g. name, extension, ...). The task will be executed if the artifact is required.
  • A org.gradle.api.provider.Provider of java.io.File, org.gradle.api.file.RegularFile or org.gradle.api.file.Directory. The information for publishing the artifact is extracted from the file or directory name. When the provider represents an output of a particular task, that task will be executed if the artifact is required.
  • java.io.File. The information for publishing the artifact is extracted from the file name.
  • java.util.Map. The map should contain a 'file' key. This is converted to an artifact as described above. You can also specify other properties of the artifact using entries in the map.

In each case, a ConfigurablePublishArtifact instance is created for the artifact, to allow artifact properties to be configured. You can also override the default values for artifact properties by using a closure to configure the properties of the artifact instance

Examples

An example showing how to associate an archive task with a configuration via the artifact handler. This way the archive can be published or referred in other projects via the configuration.

 configurations { //declaring new configuration that will be used to associate with artifacts schema } task schemaJar(type: Jar) { //some imaginary task that creates a jar artifact with some schema } //associating the task that produces the artifact with the configuration artifacts { //configuration name and the task: schema schemaJar } 

org.gradle.api.artifacts.ArtifactIdentifier

The identifier for a module artifact.

org.gradle.api.artifacts.repositories.ArtifactRepository

A repository for resolving and publishing artifacts.

org.gradle.api.artifacts.ArtifactRepositoryContainer

A ResolverContainer is responsible for managing a set of ArtifactRepository instances. Repositories are arranged in a sequence.

You can obtain a ResolverContainer instance by calling org.gradle.api.Project#getRepositories() or using the repositories property in your build script.

The resolvers in a container are accessible as read-only properties of the container, using the name of the resolver as the property name. For example:

 repositories.maven { name 'myResolver' } repositories.myResolver.url = 'some-url' 

A dynamic method is added for each resolver which takes a configuration closure. This is equivalent to calling #getByName(String, groovy.lang.Closure). For example:

 repositories.maven { name 'myResolver' } repositories.myResolver { url 'some-url' } 

org.gradle.api.artifacts.query.ArtifactResolutionQuery

A builder to construct a query that can resolve selected software artifacts of the specified components.

 apply plugin: 'java' task resolveCompileSources { doLast { def componentIds = configurations.compile.incoming.resolutionResult.allDependencies.collect { it.selected.id } def result = dependencies.createArtifactResolutionQuery() .forComponents(componentIds) .withArtifacts(JvmLibrary, SourcesArtifact, JavadocArtifact) .execute() for (component in result.resolvedComponents) { component.getArtifacts(SourcesArtifact).each { println "Source artifact for ${component.id}: ${it.file}" } } } } 

org.gradle.api.artifacts.result.ArtifactResolutionResult

The result of executing an artifact resolution query.

org.gradle.api.artifacts.result.ArtifactResult

The result of resolving an artifact.

org.gradle.api.artifacts.transform.ArtifactTransform

Base class for artifact transformations.

org.gradle.api.artifacts.transform.ArtifactTransformException

An exception to report a problem during transformation execution.

org.gradle.api.artifacts.type.ArtifactTypeContainer

Defines a set of known artifact types and related meta-data. This allows you to fine tune how dependency resolution handles artifacts of a specific type. Each entry in this container defines a particular artifact type, such as a JAR or an AAR, and some information about that artifact type.

org.gradle.api.artifacts.type.ArtifactTypeDefinition

Meta-data about a particular type of artifacts.

org.gradle.api.artifacts.ArtifactView

A view over the artifacts resolved for this set of dependencies. By default, the view returns all files and artifacts, but this can be restricted by component identifier or by attributes.

org.gradle.language.assembler.tasks.Assemble

Translates Assembly language source files into object files.

org.gradle.language.assembler.plugins.AssemblerLangPlugin

Adds core Assembler language support.

org.gradle.language.assembler.plugins.AssemblerPlugin

A plugin for projects wishing to build native binary components from Assembly language sources.

Automatically includes the AssemblerLangPlugin for core Assembler support and the NativeComponentPlugin for native component support.

  • Creates a org.gradle.language.assembler.tasks.Assemble task for each org.gradle.language.assembler.AssemblerSourceSet to assemble the sources.

org.gradle.language.assembler.AssemblerSourceSet

A set of assembly language sources.

 apply plugin: "assembler" model { components { main(NativeLibrarySpec) { sources { asm { source { srcDirs "src/main/i386", "src/shared/asm" include "**/*.s" } } } } } } 

org.gradle.api.attributes.Attribute

An attribute is a named entity with a type. It is used in conjunction with a AttributeContainer to provide a type safe container for attributes. This class isn't intended to store the value of an attribute, but only represent the identity of the attribute. It means that an attribute must be immutable and can potentially be pooled. Attributes can be created using the factory method.

org.gradle.api.attributes.AttributeCompatibilityRule

A rule that determines whether a given attribute value is compatible some provided attribute value.

org.gradle.api.attributes.AttributeContainer

An attribute container is a container of Attribute, which are strongly typed named entities. Such a container is responsible for storing and getting attributes in a type safe way. In particular, attributes are strongly typed, meaning that when we get a value from the container, the returned value type is inferred from the type of the attribute. In a way, an attribute container is similar to a java.util.Map where the entry is a "typed String" and the value is of the string type. However the set of methods available to the container is much more limited. It is not allowed to have two attributes with the same name but different types in the container.

org.gradle.api.attributes.AttributeDisambiguationRule

A rule that selects the best value out of a set of two or more candidates.

org.gradle.api.attributes.AttributeMatchingStrategy

An attribute matching strategy is responsible for providing information about how an Attribute is matched during dependency resolution. In particular, it will tell if a value, provided by a consumer, is compatible with a value provided by a candidate.

org.gradle.api.java.archives.Attributes

Represent the attributes of a manifest section.

org.gradle.api.attributes.AttributesSchema

An attributes schema stores information about Attribute and how they can be matched together.

org.gradle.authentication.Authentication

Base interface for transport authentication schemes.

org.gradle.api.artifacts.repositories.AuthenticationContainer

Container for configuring repository authentication schemes of type org.gradle.authentication.Authentication.

org.gradle.api.artifacts.repositories.AuthenticationSupported

An artifact repository which supports username/password authentication.

org.gradle.api.credentials.AwsCredentials

Represents credentials used to authenticate with Amazon Web Services.

org.gradle.authentication.aws.AwsImAuthentication

Authentication scheme for digest access authentication over S3.

org.gradle.platform.base.binary.BaseBinarySpec

Base class that may be used for custom BinarySpec implementations. However, it is generally better to use an interface annotated with org.gradle.model.Managed and not use an implementation class at all.

org.gradle.platform.base.component.BaseComponentSpec

Base class that may be used for custom GeneralComponentSpec implementations. However, it is generally better to use an interface annotated with org.gradle.model.Managed and not use an implementation class at all.

org.gradle.process.BaseExecSpec

Specifies options for launching a child process.

org.gradle.api.tasks.compile.BaseForkOptions

Fork options for compilation. Only take effect if fork is true.

org.gradle.language.base.sources.BaseLanguageSourceSet

Base class that may be used for custom LanguageSourceSet implementations. However, it is generally better to use an interface annotated with org.gradle.model.Managed and not use an implementation class at all.

org.gradle.api.plugins.BasePlugin

A org.gradle.api.Plugin which defines a basic project lifecycle and some common convention properties.

org.gradle.api.plugins.BasePluginConvention

A Convention used for the BasePlugin.

org.gradle.language.scala.tasks.BaseScalaCompileOptions

Options for Scala platform compilation.

org.gradle.authentication.http.BasicAuthentication

Authentication scheme for basic access authentication over HTTP. When using this scheme, credentials are sent preemptively.

org.gradle.tooling.model.gradle.BasicGradleProject

Provides some basic details about a Gradle project.

org.gradle.tooling.model.idea.BasicIdeaProject

IdeaProject that does not provide/resolve any external dependencies. Only project dependencies and local file dependencies are included on the modules' classpath.

Useful for 'previewing' the output model of IdeaProject because it is supposed to be fast (e.g. does not download dependencies from the web).

org.gradle.platform.base.Binary

A physical binary artifact, which can run on a particular platform or runtime.

org.gradle.platform.base.plugins.BinaryBasePlugin

Base plugin for binaries support. - Adds a BinarySpec container named binaries to the project. - Registers the base BinarySpec type. - For each BinarySpec, registers a lifecycle task to assemble that binary. - For each BinarySpec, adds the binary's source sets as its default inputs. - Links the tasks for each BinarySpec across to the tasks container.

org.gradle.language.BinaryCollection

A collection of binaries that are created and configured as they are required.

Each element in this collection passes through several states. The element is created and becomes 'known'. The element is passed to any actions registered using #whenElementKnown(Action). The element is then configured using any actions registered using #configureEach(Action) and becomes 'finalized'. The element is passed to any actions registered using #whenElementFinalized(Action). Elements are created and configured only when required.

org.gradle.platform.base.BinaryContainer

A container for project binaries, which represent physical artifacts that can run on a particular platform or runtime.

org.gradle.language.BinaryProvider

Represents a binary that is created and configured as required.

org.gradle.plugins.signing.type.BinarySignatureType

Binary signature type.

org.gradle.platform.base.BinarySpec

Represents a binary that is the result of building a component.

org.gradle.platform.base.BinaryTasks

Declares the tasks to build a custom org.gradle.platform.base.BinarySpec binary. The following example demonstrates how to register multiple tasks for custom binary using a plugin with a org.gradle.platform.base.BinaryTasks annotation.

 @Managed interface SampleComponent extends ComponentSpec {} @Managed interface SampleBinary extends BinarySpec {} apply plugin: MyCustomBinariesPlugin class MyCustomBinaryCreationTask extends DefaultTask { @TaskAction void build() { //building the binary } } class MyCustomBinariesPlugin extends RuleSource { @ComponentType void register(TypeBuilder<SampleBinary> builder) {} @BinaryTasks void createBinaryTasks(ModelMap<Task> tasks, SampleBinary binary) { tasks.create("${binary.name}Task1", MyCustomBinaryCreationTask) tasks.create("${binary.name}Task2") { dependsOn "${binary.name}Task1" } } } 

org.gradle.platform.base.BinaryTasksCollection

A collection of tasks associated to a binary

org.gradle.plugins.javascript.envjs.browser.BrowserEvaluate
org.gradle.plugins.javascript.envjs.browser.BrowserEvaluator
org.gradle.tooling.BuildAction

An action that executes against a Gradle build and produces a result of type T.

You can execute a BuildAction using the ProjectConnection#action(BuildAction) method.

org.gradle.tooling.BuildActionExecuter

Used to execute a BuildAction in the build process.

org.gradle.tooling.BuildActionFailureException

Thrown when a BuildAction fails.

org.gradle.BuildAdapter

A BuildListener adapter class for receiving build events. The methods in this class are empty. This class exists as convenience for creating listener objects.

org.gradle.api.plugins.announce.BuildAnnouncementsPlugin

A plugin which announces interesting build lifecycle events.

org.gradle.caching.configuration.BuildCache

Configuration object for a build cache.

org.gradle.caching.configuration.BuildCacheConfiguration

Configuration for the build cache for an entire Gradle build.

org.gradle.caching.BuildCacheEntryReader

A reader for build cache entries.

org.gradle.caching.BuildCacheEntryWriter

Writer to serialize a build cache entry.

org.gradle.caching.BuildCacheException

BuildCacheException is the base class of all exceptions thrown by a BuildCacheService.

org.gradle.caching.BuildCacheKey

Cache key identifying an entry in the build cache.

org.gradle.caching.BuildCacheService

Protocol interface to be implemented by a client to a build cache backend.

Build cache implementations should report a non-fatal failure as a BuildCacheException. Non-fatal failures could include failing to retrieve a cache entry or unsuccessfully completing an upload a new cache entry. Gradle will not fail the build when catching a BuildCacheException, but it may disable caching for the build if too many failures occur.

All other failures will be considered fatal and cause the Gradle build to fail. Fatal failures could include failing to read or write cache entries due to file permissions, authentication or corruption errors.

Every build cache implementation should define a org.gradle.caching.configuration.BuildCache configuration and BuildCacheServiceFactory factory.

org.gradle.caching.BuildCacheServiceFactory

Factory interface to be provided by build cache service implementations.

To be able to use a BuildCacheService, the factory that implements this interface and the configuration type (BuildCache) must be registered with the org.gradle.caching.configuration.BuildCacheConfiguration.

In settings.gradle:

 buildCache { // Register custom build cache implementation registerBuildCacheService(CustomBuildCache, CustomBuildCacheFactory) remote(CustomBuildCache) { // configure custom build cache. } } 

org.gradle.tooling.BuildCancelledException

Thrown when a org.gradle.tooling.LongRunningOperation is cancelled before the operation completes.

org.gradle.api.BuildCancelledException

A BuildCancelledException is thrown when a build is interrupted due to cancellation request.

org.gradle.plugins.ide.eclipse.model.BuildCommand

A build command.

org.gradle.tooling.BuildController

Provides a BuildAction various ways to control a Gradle build and access information about the build.

org.gradle.api.reporting.plugins.BuildDashboardPlugin

Adds a task, "buildDashboard", that aggregates the output of all tasks that produce reports.

org.gradle.api.reporting.BuildDashboardReports

The reporting configuration for the GenerateBuildDashboard task.

org.gradle.tooling.model.build.BuildEnvironment

Informs about the build environment, like Gradle version or the Java home in use.

Example:

 ProjectConnection connection = GradleConnector.newConnector() .forProjectDirectory(new File("someProjectFolder")) .connect(); try { BuildEnvironment env = connection.getModel(BuildEnvironment.class); System.out.println("Gradle version: " + env.getGradle().getGradleVersion()); System.out.println("Java home: " + env.getJava().getJavaHome()); } finally { connection.close(); } 

org.gradle.api.tasks.diagnostics.BuildEnvironmentReportTask

Provides information about the build environment for the project that the task is associated with.

Currently, this information is limited to the project's declared build script dependencies visualised in a similar manner as provided by DependencyReportTask.

It is not necessary to manually add a task of this type to your project, as every project automatically has a task of this type by the name "buildEnvironment".

org.gradle.tooling.BuildException

Thrown when a Gradle build fails or when a model cannot be built.

org.gradle.tooling.model.BuildIdentifier

Identifies a Gradle build.

A Gradle Build is a collection of one or more projects.

org.gradle.api.artifacts.component.BuildIdentifier

Identifies a Gradle build. The identifier is unique within a Gradle invocation, so for example, each included build will have a different identifier.

org.gradle.buildinit.plugins.BuildInitPlugin

The build init plugin.

org.gradle.tooling.model.gradle.BuildInvocations

A model providing access to org.gradle.tooling.model.Launchable instances that can be used to initiate Gradle build.

To launch a build, you pass one or more org.gradle.tooling.model.Launchable instances to either org.gradle.tooling.BuildLauncher#forTasks(Iterable) or org.gradle.tooling.BuildLauncher#forLaunchables(Iterable).

org.gradle.tooling.BuildLauncher

A BuildLauncher allows you to configure and execute a Gradle build.

Instances of BuildLauncher are not thread-safe. You use a BuildLauncher as follows:

Example:
 ProjectConnection connection = GradleConnector.newConnector() .forProjectDirectory(new File("someFolder")) .connect(); try { BuildLauncher build = connection.newBuild(); //select tasks to run: build.forTasks("clean", "test"); //include some build arguments: build.withArguments("-i", "--project-dir", "someProjectDir"); //configure the standard input: build.setStandardInput(new ByteArrayInputStream("consume this!".getBytes())); //in case you want the build to use java different than default: build.setJavaHome(new File("/path/to/java")); //if your build needs crazy amounts of memory: build.setJvmArguments("-Xmx2048m", "-XX:MaxPermSize=512m"); //if you want to listen to the progress events: ProgressListener listener = null; // use your implementation build.addProgressListener(listener); //kick the build off: build.run(); } finally { connection.close(); } 

org.gradle.BuildListener

A BuildListener is notified of the major lifecycle events as a build is executed.

org.gradle.tooling.model.BuildModel

Represents a model that is associated with or represents some Gradle build.

org.gradle.BuildResult

A BuildResult packages up the results of a build executed by a org.gradle.initialization.GradleLauncher instance.

org.gradle.testkit.runner.BuildResult

The result of executing a build, via the GradleRunner.

org.gradle.testkit.runner.BuildTask

A task that was executed when running a specific build.

org.gradle.nativeplatform.BuildType

Specifies a build-type for a native binary. Common build types are 'debug' and 'release', but others may be defined.

org.gradle.nativeplatform.BuildTypeContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.nativeplatform.BuildTypeContainer

A container of BuildTypes.

org.gradle.api.Buildable

A Buildable represents an artifact or set of artifacts which are built by one or more Task instances.

org.gradle.api.component.BuildableComponent

Represents a component that can be built.

org.gradle.api.BuildableComponentSpec

A ComponentSpec that is directly Buildable via a specified task.

org.gradle.tooling.model.BuildableElement

Represents an element which has Gradle tasks associated with it.

org.gradle.language.c.tasks.CCompile

Compiles C source files into object files.

org.gradle.language.c.plugins.CLangPlugin

Adds core C language support.

org.gradle.language.c.plugins.CPlugin

A plugin for projects wishing to build native binary components from C sources.

Automatically includes the CLangPlugin for core C++ support and the org.gradle.nativeplatform.plugins.NativeComponentPlugin for native component support.

  • Creates a org.gradle.language.c.tasks.CCompile task for each org.gradle.language.c.CSourceSet to compile the C sources.

org.gradle.language.c.tasks.CPreCompiledHeaderCompile

Compiles C header source files into object files.

org.gradle.language.c.CSourceSet

A set of C source files.

A C source set contains a set of source files, together with an optional set of exported header files.

 apply plugin: "c" model { components { main(NativeLibrarySpec) { sources { c { source { srcDirs "src/main/cpp", "src/shared/c++" include "**/*.c" } exportedHeaders { srcDirs "src/main/include" } } } } } } 

org.gradle.nativeplatform.test.cunit.plugins.CUnitConventionPlugin

A plugin that applies the CUnitPlugin and adds conventions on top of it.

org.gradle.nativeplatform.test.cunit.plugins.CUnitPlugin

A plugin that sets up the infrastructure for testing native binaries with CUnit.

org.gradle.nativeplatform.test.cunit.CUnitTestSuiteBinarySpec

An executable which run a CUnit test suite.

org.gradle.nativeplatform.test.cunit.CUnitTestSuiteSpec

Test suite of CUnit tests.

org.gradle.api.artifacts.CacheableRule

Denotates a rule which execution is subject to caching.

org.gradle.api.tasks.CacheableTask

Attached to a task type to indicate that task output caching should be enabled by default for tasks of this type.

Only tasks that produce reproducible and relocatable output should be marked with CacheableTask.

Caching for individual task instances can be disabled via TaskOutputs#cacheIf(String, Spec) or TaskOutputs#doNotCacheIf(String, Spec).

org.gradle.tooling.CancellationToken

Token that propagates notification that an operation should be cancelled. See org.gradle.tooling.CancellationTokenSource for details.

All implementations of this interface are required to be thread safe.

org.gradle.tooling.CancellationTokenSource

A CancellationTokenSource allows you to issue cancellation requests to one or more org.gradle.tooling.LongRunningOperation instances. To use a token source:

All implementations of this interface are required to be thread safe.

org.gradle.api.capabilities.CapabilitiesMetadata

Gives access to the list of capabilities of a component.

org.gradle.api.capabilities.Capability

Represents a capability. Capabilities are versioned. Only one component for a specific capability can be found on a dependency graph.

org.gradle.api.CheckableComponentSpec

A ComponentSpec that is directly checkable via a specified task.

org.gradle.api.plugins.quality.Checkstyle

Runs Checkstyle against some source files.

org.gradle.api.plugins.quality.CheckstyleExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.quality.CheckstyleExtension

Configuration options for the Checkstyle plugin.

org.gradle.api.plugins.quality.CheckstylePlugin

Checkstyle Plugin.

org.gradle.api.plugins.quality.CheckstyleReports

The reporting configuration for the Checkstyle task.

org.gradle.api.CircularReferenceException

A CircularReferenceException is thrown if circular references exists between tasks, the project evaluation order or the project dependsOn order.

org.gradle.nativeplatform.toolchain.Clang

The Clang tool chain.

org.gradle.nativeplatform.toolchain.plugins.ClangCompilerPlugin

A Plugin which makes the Clang compiler available for compiling C/C++ code.

org.gradle.jvm.ClassDirectoryBinarySpec

An exploded binary containing resources and compiled class files.

org.gradle.plugins.ide.eclipse.model.Classpath

Represents the customizable elements of an eclipse classpath file. (via XML hooks everything is customizable).

org.gradle.jvm.Classpath

A collection of files to be used as a class path.

org.gradle.api.tasks.Classpath

Marks a property as specifying a JVM classpath for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

Note: to stay compatible with versions prior to Gradle 3.2, classpath properties need to be annotated with @InputFiles as well.

org.gradle.tooling.model.eclipse.ClasspathAttribute

Optional description associated with Eclipse classpath entries.

org.gradle.plugins.ide.eclipse.model.ClasspathEntry

Represents an entry in the Eclipse classpath.

org.gradle.api.tasks.ClasspathNormalizer

Normalizes file input that represents a Java runtime classpath. Compared to the default behavior this normalizer keeps the order of any root files, but ignores the order and timestamps of files in directories and ZIP/JAR files.

org.gradle.api.artifacts.ClientModule

To model a module in your dependency declarations. Usually you can either declare a single dependency artifact or you declare a module dependency that depends on a module descriptor in a repository. With a client module you can declare a module dependency without the need of a module descriptor in a remote repository.

org.gradle.kotlin.dsl.ClientModuleScope

Receiver for ClientModule configuration blocks.

groovy.lang.Closure (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.quality.CodeNarc

Runs CodeNarc against some source files.

org.gradle.api.plugins.quality.CodeNarcExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.quality.CodeNarcExtension

Configuration options for the CodeNarc plugin.

org.gradle.api.plugins.quality.CodeNarcPlugin

CodeNarc Plugin.

org.gradle.api.plugins.quality.CodeNarcReports

The reporting configuration for the CodeNarc test.

org.gradle.api.plugins.quality.CodeQualityExtension

Base Code Quality Extension.

org.gradle.plugins.javascript.coffeescript.CoffeeScriptBasePlugin
org.gradle.plugins.javascript.coffeescript.CoffeeScriptCompile
org.gradle.plugins.javascript.coffeescript.CoffeeScriptCompileOptions
org.gradle.plugins.javascript.coffeescript.CoffeeScriptCompileSpec
org.gradle.plugins.javascript.coffeescript.CoffeeScriptCompiler
org.gradle.plugins.javascript.coffeescript.CoffeeScriptExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.javascript.coffeescript.CoffeeScriptExtension
org.gradle.language.coffeescript.CoffeeScriptSourceSet

Represents a source set for CoffeeScript sources

org.gradle.process.CommandLineArgumentProvider

Provides arguments to a process.

org.gradle.nativeplatform.toolchain.CommandLineToolConfiguration

An executable tool that forms part of a tool chain.

org.gradle.api.plugins.buildcomparison.gradle.CompareGradleBuilds

Executes two Gradle builds (that can be the same build) with specified versions and compares the outcomes. Please see the “Comparing Builds” chapter of the Gradle User Guide for more information.

org.gradle.api.plugins.buildcomparison.gradle.CompareGradleBuildsPlugin

Preconfigures the project to run a gradle build comparison.

org.gradle.api.tasks.CompatibilityAdapterForTaskInputs

Helper interface for binary compatibility with Gradle 2.x version of the TaskInputs interface.

org.gradle.api.tasks.CompatibilityAdapterForTaskOutputs

Helper interface for binary compatibility with Gradle 2.x version of the TaskOutputs interface.

org.gradle.api.attributes.CompatibilityCheckDetails

Provides context about attribute compatibility checks, and allows the user to define when an attribute is compatible with another.

org.gradle.api.attributes.CompatibilityRuleChain

A chain of compatibility checks, implemented as action rules. By default the chain is empty and will eventually tell the values are incompatible if no rule expressed an opinion.

For a given set of rules, the execution is done in order, and interrupts as soon as a rule expressed an option (through CompatibilityCheckDetails#compatible() or CompatibilityCheckDetails#incompatible()).

If the end of the rule chain is reached and that no rule expressed an opinion then we apply an equality check by default, and eventually fail if they are not equal.

org.gradle.api.tasks.CompileClasspath

Marks a property as specifying a Java compile classpath for a task. Attaching this annotation to a property means that changes that do not affect the API of the classes in classpath will be ignored. The following kinds of changes to the classpath will be ignored:

  • Changes to the path of jar or top level directories.
  • Changes to timestamps and the order of entries in Jars.
  • Changes to resources and Jar manifests, including adding or removing resources.
  • Changes to private class elements, such as private fields, methods and inner classes.
  • Changes to code, such as method bodies, static initializers and field initializers (except for constants).
  • Changes to debug information, for example when a change to a comment affects the line numbers in class debug information.
  • Changes to directories, including directory entries in Jars.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

Note: to stay compatible with versions prior to Gradle 3.4, classpath properties need to be annotated with @InputFiles as well.

org.gradle.api.tasks.CompileClasspathNormalizer

Normalizes file input that represents a Java compile classpath. Compared to the default behavior this normalizer keeps the order of any root files, but ignores the order and timestamps of files in directories and ZIP/JAR files. Compared to ClasspathNormalizer this normalizer only snapshots the ABIs of class files, and ignores any non-class resource.

org.gradle.api.tasks.compile.CompileOptions

Main options for Java compilation.

org.gradle.api.tasks.compile.CompilerArgumentProvider

Provides command-line arguments to the compiler.

org.gradle.language.base.compile.CompilerVersion

Version of a compiler.

org.gradle.api.component.Component

A software component that can be queried via the Artifact Query API.

org.gradle.api.artifacts.component.ComponentArtifactIdentifier

An opaque immutable identifier for an artifact that belongs to some component instance.

org.gradle.api.artifacts.result.ComponentArtifactsResult

The result of successfully resolving a component with a set of artifacts.

org.gradle.platform.base.plugins.ComponentBasePlugin

Base plugin for ComponentSpec support. - Registers the infrastructure to support the base ComponentSpec type and extensions to this type.

org.gradle.platform.base.ComponentBinaries

Declares the binaries that should be built for a custom org.gradle.platform.base.ComponentSpec type. The following example demonstrates how to register a binary for a custom component type using a plugin with a org.gradle.platform.base.ComponentBinaries annotation. Furthermore the plugin registers 'DefaultSampleBinary' as implementation for org.gradle.platform.base.BinarySpec.

 interface SampleComponent extends VariantComponentSpec {} interface SampleBinary extends BinarySpec {} class DefaultSampleBinary extends BaseBinarySpec implements SampleBinary {} apply plugin: MyCustomBinariesPlugin class MyCustomBinariesPlugin extends RuleSource { @ComponentType void register(TypeBuilder<SampleBinary> builder) { builder.defaultImplementation(DefaultSampleBinary) } @ComponentBinaries void createBinariesForSampleLibrary(ModelMap<SampleBinary> binaries, SampleComponent component) { binaries.create("${component.name}Binary", SampleBinary) } } 

org.gradle.language.ComponentDependencies

Allows the implementation dependencies of a component to be specified.

org.gradle.api.artifacts.component.ComponentIdentifier

An opaque immutable identifier for a component instance. There are various sub-interfaces that expose specific details about the identifier.

org.gradle.api.artifacts.ComponentMetadata

Provides a read-only view of a resolved component's metadata, which typically originates from a component descriptor (Ivy file, Maven POM).

org.gradle.api.artifacts.ComponentMetadataBuilder

A component metadata builder.

org.gradle.api.artifacts.ComponentMetadataContext

Provides access to compoment metadata from a ComponentMetadataRule.

org.gradle.api.artifacts.ComponentMetadataDetails

Describes a resolved component's metadata, which typically originates from a component descriptor (Ivy file, Maven POM). Some parts of the metadata can be changed via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

org.gradle.api.artifacts.dsl.ComponentMetadataHandler

Allows the build to provide rules that modify the metadata of depended-on software components.

Possible uses of component metadata rules are:

  • Setting the status and status scheme of a component, overriding the value specified in the component descriptor.
  • Declaring whether or not a component is 'changing', thus impacting the cache behaviour of the component.

Example:

 dependencies { components { // Set the status and status scheme for every component belonging to a module in the group "org.foo" all { ComponentMetadataDetails details -> if (details.id.group == "org.foo") { def version = details.id.version // assuming status is last part of version string details.status = version.substring(version.lastIndexOf("-") + 1) details.statusScheme = ["bronze", "silver", "gold", "platinum"] } } // Treat all components in the module "org.foo:bar" as changing withModule("org.foo:bar") { ComponentMetadataDetails details -> details.changing = true } } } 

org.gradle.api.artifacts.ComponentMetadataListerDetails

Allows a custom version lister to specify the list of versions known for a specific module.

org.gradle.api.artifacts.ComponentMetadataRule

A rule that modify ComponentMetadataDetails.

org.gradle.api.artifacts.ComponentMetadataSupplier

A component metadata rule is responsible for providing the initial metadata of a component from a remote repository, in place of parsing the descriptor. Users may implement a provider to make dependency resolution faster.

org.gradle.api.artifacts.ComponentMetadataSupplierDetails

A component metadata rule details, giving access to the identifier of the component being resolved, the metadata builder, and the repository resource accessor for this.

org.gradle.api.artifacts.ComponentMetadataVersionLister

Interface for custom version listers. A version lister is reponsible for returning the list of versions of a module which are available in a specific repository. For this, Gradle is going to call the lister once for each module it needs the list of versions. This will typically happen in case a dynamic version is requested, in which case we need to know the list of versions published for this module. It will not, however, be called for fixed version numbers.

org.gradle.language.base.plugins.ComponentModelBasePlugin

Base plugin for component support. Adds a org.gradle.platform.base.ComponentSpecContainer named components to the model. For each binary instance added to the binaries container, registers a lifecycle task to create that binary.

org.gradle.api.artifacts.ComponentModuleMetadata

Contains immutable component module metadata information.

org.gradle.api.artifacts.ComponentModuleMetadataDetails

Contains and allows configuring component module metadata information. For information and examples please see org.gradle.api.artifacts.dsl.ComponentModuleMetadataHandler

org.gradle.api.artifacts.dsl.ComponentModuleMetadataHandler

Allows to modify the metadata of depended-on software components.

Example:

 dependencies { modules { //Configuring component module metadata for the entire "google-collections" module, // declaring that legacy library was replaced with "guava". //This way, Gradle's conflict resolution can use this information and use "guava" // in case both libraries appear in the same dependency tree. module("com.google.collections:google-collections") { replacedBy("com.google.guava:guava") } } } 

org.gradle.api.reporting.components.ComponentReport

Displays some details about the software components produced by the project.

org.gradle.api.artifacts.result.ComponentResult

The result of resolving a component.

org.gradle.api.artifacts.ComponentSelection

* Represents a tuple of the component selector of a module and a candidate version to be evaluated in a component selection rule.

org.gradle.api.artifacts.result.ComponentSelectionCause

The possible component selection causes. There are a limited number of causes, but each of them can be provided with a custom description, via ComponentSelectionDescriptor.

org.gradle.api.artifacts.result.ComponentSelectionDescriptor

A component selection description, which wraps a cause with an optional custom description.

org.gradle.api.artifacts.result.ComponentSelectionReason

Answers the question why a component was selected during the dependency resolution.

org.gradle.api.artifacts.ComponentSelectionRules

* Represents a container for component selection rules. Rules can be applied as part of the resolutionStrategy of a configuration and individual components can be explicitly accepted or rejected by rule. Components that are neither accepted or rejected will be subject to the default version matching strategies.

 configurations { conf { resolutionStrategy { componentSelection { all { ComponentSelection selection -> if (selection.candidate.module == 'someModule' && selection.candidate.version == '1.1') { selection.reject("bad version '1.1' for 'someModule'") } } all { ComponentSelection selection, IvyModuleDescriptor descriptor, ComponentMetadata metadata -> if (selection.candidate.module == 'someModule' && descriptor.branch == 'testing') { if (metadata.status != 'milestone') { selection.reject("only use milestones for someModule:testing") } } } withModule("org.sample:api") { ComponentSelection selection -> if (selection.candidate.version == "1.1") { selection.reject("known bad version") } } } } } } 

org.gradle.api.artifacts.component.ComponentSelector

Represents some opaque criteria used to select a component instance during dependency resolution. Various sub-interfaces expose specific details about the criteria.

org.gradle.platform.base.ComponentSpec

A software component that is built by Gradle.

org.gradle.platform.base.ComponentSpecContainer

A container of software components.

org.gradle.platform.base.ComponentType

Declares a custom org.gradle.platform.base.ComponentSpec type. The following example demonstrates how to register a custom component type using a plugin with a ComponentType annotation. Furthermore the plugin creates an instance of SampleComponent named 'sampleComponent'.

 interface SampleComponent extends ComponentSpec {} class DefaultSampleComponent extends BaseComponentSpec implements SampleComponent {} apply plugin: MySamplePlugin class MySamplePlugin extends RuleSource { @ComponentType void register(TypeBuilder<SampleComponent> builder) { builder.defaultImplementation(DefaultSampleComponent) } @Mutate void createSampleLibraryComponents(ModelMap<SampleComponent> componentSpecs) { componentSpecs.create("sampleComponent") } } 

org.gradle.language.ComponentWithBinaries

Represents a component that is composed of one or more binaries.

org.gradle.api.component.ComponentWithCoordinates

Represents a component that determines its publication coordinates.

org.gradle.language.ComponentWithDependencies

Represents a component with implementation dependencies.

org.gradle.language.nativeplatform.ComponentWithExecutable

Represents a native component that produces an executable.

org.gradle.language.nativeplatform.ComponentWithInstallation

Represents a native component that produces an application installation.

org.gradle.language.nativeplatform.ComponentWithLinkFile

Represents a native component that produces a file to be used at link time.

org.gradle.language.nativeplatform.ComponentWithLinkUsage

Represents a native component whose link time file and dependencies are published for consumption by some other project.

org.gradle.language.nativeplatform.ComponentWithNativeRuntime

Represents a component that produces outputs that run on a native platform.

org.gradle.language.nativeplatform.ComponentWithObjectFiles

Represents a component that produces object files.

org.gradle.language.ComponentWithOutputs

Represents a component with output files.

org.gradle.language.nativeplatform.ComponentWithRuntimeFile

Represents a native component that produces a file to be used at runtime.

org.gradle.language.nativeplatform.ComponentWithRuntimeUsage

Represents a native component whose runtime file and dependencies are published for consumption by some other project.

org.gradle.language.nativeplatform.ComponentWithSharedLibrary

Represents a native component that produces a shared library.

org.gradle.language.nativeplatform.ComponentWithStaticLibrary

Represents a component that produces a static library.

org.gradle.api.component.ComponentWithVariants

Represents a SoftwareComponent that provides one or more mutually exclusive children, or variants.

org.gradle.api.specs.CompositeSpec

A org.gradle.api.specs.Spec which aggregates a sequence of other Spec instances.

org.gradle.api.tasks.bundling.Compression

Specifies the compression which should be applied to a TAR archive.

org.gradle.api.artifacts.maven.Conf2ScopeMapping

An immutable mapping to map a dependency configuration to a Maven scope. This class has implemented equality and hashcode based on its values not on object identity.

org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer

Defines a set of rules for how to map the Gradle dependencies to a POM. This mapping is based on the configuration the dependencies belong to.

org.gradle.ide.visualstudio.ConfigFile

A configuration file generated for Visual Studio.

org.gradle.api.file.ConfigurableFileCollection (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.file.ConfigurableFileCollection

A ConfigurableFileCollection is a mutable FileCollection.

You can obtain an instance of ConfigurableFileCollection by calling

org.gradle.api.file.ConfigurableFileTree

A FileTree with a single base directory, which can be configured and modified.

You can obtain a ConfigurableFileTree instance by calling org.gradle.api.Project#fileTree(java.util.Map).

org.gradle.api.initialization.ConfigurableIncludedBuild

A build that is to be included in the composite.

org.gradle.tooling.ConfigurableLauncher

A ConfigurableLauncher allows you to configure a long running operation.

org.gradle.api.artifacts.ConfigurablePublishArtifact

A PublishArtifact whose properties can be modified.

org.gradle.api.reporting.ConfigurableReport

A file based report to be created with a configurable destination.

org.gradle.api.artifacts.Configuration (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.artifacts.Configuration

A Configuration represents a group of artifacts and their dependencies. Find more information about declaring dependencies to a configuration or about managing configurations in docs for ConfigurationContainer

Configuration is an instance of a FileCollection that contains all dependencies (see also #getAllDependencies()) but not artifacts. If you want to refer to the artifacts declared in this configuration please use #getArtifacts() or #getAllArtifacts(). Read more about declaring artifacts in the configuration in docs for org.gradle.api.artifacts.dsl.ArtifactHandler Please see the Managing Dependency Configurations User Guide chapter for more information.

org.gradle.api.artifacts.ConfigurationContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.artifacts.ConfigurationContainer

A ConfigurationContainer is responsible for declaring and managing configurations. See also Configuration.

You can obtain a ConfigurationContainer instance by calling org.gradle.api.Project#getConfigurations(), or using the configurations property in your build script.

The configurations in a container are accessible as read-only properties of the container, using the name of the configuration as the property name. For example:

 configurations.create('myConfiguration') configurations.myConfiguration.transitive = false 

A dynamic method is added for each configuration which takes a configuration closure. This is equivalent to calling #getByName(String, groovy.lang.Closure). For example:

 configurations.create('myConfiguration') configurations.myConfiguration { transitive = false } 
Examples An example showing how to refer to a given configuration by name in order to get hold of all dependencies (e.g. jars, but only)
 apply plugin: 'java' //so that I can use 'compile' configuration //copying all dependencies attached to 'compile' into a specific folder task copyAllDependencies(type: Copy) { //referring to the 'compile' configuration from configurations.compile into 'allLibs' } 
An example showing how to declare and configure configurations
 apply plugin: 'java' //so that I can use 'compile', 'testCompile' configurations configurations { //adding a configuration: myConfiguration //adding a configuration that extends existing configuration: //(testCompile was added by the java plugin) myIntegrationTestsCompile.extendsFrom(testCompile) //configuring existing configurations not to put transitive dependencies on the compile classpath //this way you can avoid issues with implicit dependencies to transitive libraries compile.transitive = false testCompile.transitive = false } 
Examples on configuring the resolution strategy - see docs for ResolutionStrategy Please see the Managing Dependency Configurations User Guide chapter for more information.

org.gradle.model.ConfigurationCycleException

Thrown when a cycle is encountered while configuring a model element.

org.gradle.api.artifacts.ConfigurationPublications

Represents the outgoing artifacts associated with a configuration. These artifacts are used when the configuration is referenced during dependency resolution.

You can use this interface associate artifacts with a configuration using the #artifact(Object) methods. You can also define several variants of the configuration's artifacts. Each variant represents a set of artifacts that form some mutually exclusive usage of the component.

An implicit variant is defined for a configuration whenever any artifacts are attached directly to this object or inherited from another configuration.

org.gradle.api.artifacts.ConfigurationVariant

Represents some variant of an outgoing configuration.

org.gradle.api.tasks.Console

Attached to a task property to indicate that the property is not to be taken into account for up-to-date checking, because its value only influences the console output of the task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task not to be considered out-of-date when the property has changed.

org.gradle.api.logging.configuration.ConsoleOutput

Specifies how to treat color and dynamic console output.

org.gradle.plugins.ide.eclipse.model.Container

A container classpath entry.

org.gradle.api.file.ContentFilterable (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.file.ContentFilterable

Represents some binary resource whose content can be filtered.

org.gradle.api.plugins.Convention (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.Convention

A Convention manages a set of convention objects. When you add a convention object to a Convention, and the properties and methods of the convention object become available as properties and methods of the object which the convention is associated to. A convention object is simply a POJO or POGO. Usually, a Convention is used by plugins to extend a org.gradle.api.Project or a org.gradle.api.Task.

org.gradle.api.dsl.ConventionProperty

This class was previously used for documentation.

org.gradle.api.tasks.Copy

Copies files into a destination directory. This task can also rename and filter files as it copies. The task implements org.gradle.api.file.CopySpec for specifying what to copy.

Examples:

 task copyDocs(type: Copy) { from 'src/main/doc' into 'build/target/doc' } //for Ant filter import org.apache.tools.ant.filters.ReplaceTokens //for including in the copy task def dataContent = copySpec { from 'src/data' include '*.data' } task initConfig(type: Copy) { from('src/main/config') { include '**/*.properties' include '**/*.xml' filter(ReplaceTokens, tokens: [version: '2.3.1']) } from('src/main/config') { exclude '**/*.properties', '**/*.xml' } from('src/main/languages') { rename 'EN_US_(.*)', '$1' } into 'build/target/config' exclude '**/*.bak' includeEmptyDirs = false with dataContent } 

org.gradle.api.file.CopyProcessingSpec

Specifies the destination of a copy.

org.gradle.api.file.CopySourceSpec

Specifies sources for a file copy.

org.gradle.api.file.CopySpec (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.file.CopySpec

A set of specifications for copying files. This includes:

  • source directories (multiples allowed)
  • destination directory
  • ANT like include patterns
  • ANT like exclude patterns
  • File relocating rules
  • renaming rules
  • content filters
CopySpecs may be nested by passing a closure to one of the from methods. The closure creates a child CopySpec and delegates methods in the closure to the child. Child CopySpecs inherit any values specified in the parent. This allows constructs like:
 def myCopySpec = project.copySpec { into('webroot') exclude('**/.data/**') from('src/main/webapp') { include '**/*.jsp' } from('src/main/js') { include '**/*.js' } } 
In this example, the into and exclude specifications at the root level are inherited by the two child CopySpecs. Copy specs can be reused in other copy specs via #with(CopySpec...) method. This enables reuse of the copy spec instances.
 def contentSpec = copySpec { from("content") { include "**/*.txt" } } task copy(type: Copy) { into "$buildDir/copy" with contentSpec } 

org.gradle.external.javadoc.CoreJavadocOptions

Provides the core Javadoc Options. That is, provides the options which are not doclet specific.

org.gradle.language.cpp.CppApplication

Configuration for a C++ application, defining the source files that make up the application plus other settings.

An instance of this type is added as a project extension by the C++ executable plugin.

org.gradle.language.cpp.plugins.CppApplicationPlugin

A plugin that produces a native application from C++ source.

Assumes the source files are located in `src/main/cpp` and header files are located in `src/main/headers`.

Adds a CppApplication extension to the project to allow configuration of the application.

org.gradle.language.cpp.plugins.CppBasePlugin

A common base plugin for the C++ executable and library plugins

org.gradle.language.cpp.CppBinary

A binary built from C++ source and linked from the resulting object files.

org.gradle.language.cpp.tasks.CppCompile

Compiles C++ source files into object files.

org.gradle.language.cpp.CppComponent

Configuration for a C++ component, such as a library or executable, defining the source files and private header directories that make up the component. Private headers are those that are visible only to the source files of the component.

A C++ component is composed of some C++ source files that are compiled and then linked into some binary.

An instance of this type is added as a project extension by the C++ plugins.

org.gradle.language.cpp.CppExecutable

An executable built from C++ source.

org.gradle.language.cpp.plugins.CppLangPlugin

Adds core C++ language support.

org.gradle.language.cpp.CppLibrary

Configuration for a C++ library, defining the source files and header directories that make up the library plus other settings.

An instance of this type is added as a project extension by the C++ library plugin.

org.gradle.language.cpp.plugins.CppLibraryPlugin

A plugin that produces a native library from C++ source.

Assumes the source files are located in `src/main/cpp`, public headers are located in `src/main/public` and implementation header files are located in `src/main/headers`.

Adds a CppLibrary extension to the project to allow configuration of the library.

org.gradle.language.cpp.CppPlatform

A target platform for building C++ binaries.

org.gradle.language.cpp.plugins.CppPlugin

A plugin for projects wishing to build native binary components from C++ sources.

Automatically includes the CppLangPlugin for core C++ support and the NativeComponentPlugin for native component support.

  • Creates a org.gradle.language.cpp.tasks.CppCompile task for each org.gradle.language.cpp.CppSourceSet to compile the C++ sources.

org.gradle.language.cpp.tasks.CppPreCompiledHeaderCompile

Compiles C++ header source files into object files.

org.gradle.language.cpp.CppSharedLibrary

A shared library built from C++ source.

org.gradle.language.cpp.CppSourceSet

A set of C++ source files.

A C++ source set contains a set of source files, together with an optional set of exported header files.

 apply plugin: "cpp" model { components { main(NativeLibrarySpec) { sources { cpp { source { srcDirs "src/main/cpp", "src/shared/c++" include "**/*.cpp" } exportedHeaders { srcDirs "src/main/include", "src/shared/include" } } } } } } 

org.gradle.language.cpp.CppStaticLibrary

A static library built from C++ source.

org.gradle.nativeplatform.test.cpp.CppTestExecutable

A test executable with tests implemented in C++.

org.gradle.nativeplatform.test.cpp.CppTestSuite

A C++ test suite.

org.gradle.nativeplatform.test.cpp.plugins.CppUnitTestPlugin

A plugin that sets up the infrastructure for testing C++ binaries using a simple test executable. Gradle will create a RunTestExecutable task that relies on the exit code of the binary.

org.gradle.jvm.application.tasks.CreateStartScripts

Creates start scripts for launching JVM applications.

Example:

 task createStartScripts(type: CreateStartScripts) { outputDir = file('build/sample') mainClassName = 'org.gradle.test.Main' applicationName = 'myApp' classpath = files('path/to/some.jar') } 

Note: the Gradle "application" plugin adds a pre-configured task of this type named "startScripts".

The task generates separate scripts targeted at Microsoft Windows environments and UNIX-like environments (e.g. Linux, macOS). The actual generation is implemented by the #getWindowsStartScriptGenerator() and #getUnixStartScriptGenerator() properties, of type ScriptGenerator.

Example:

 task createStartScripts(type: CreateStartScripts) { unixStartScriptGenerator = new CustomUnixStartScriptGenerator() windowsStartScriptGenerator = new CustomWindowsStartScriptGenerator() } class CustomUnixStartScriptGenerator implements ScriptGenerator { void generateScript(JavaAppStartScriptGenerationDetails details, Writer destination) { // implementation } } class CustomWindowsStartScriptGenerator implements ScriptGenerator { void generateScript(JavaAppStartScriptGenerationDetails details, Writer destination) { // implementation } } 

The default generators are of the type org.gradle.jvm.application.scripts.TemplateBasedScriptGenerator, with default templates. This templates can be changed via the org.gradle.jvm.application.scripts.TemplateBasedScriptGenerator#setTemplate(org.gradle.api.resources.TextResource) method.

The default implementations used by this task use Groovy's SimpleTemplateEngine to parse the template, with the following variables available:

  • applicationName
  • optsEnvironmentVar
  • exitEnvironmentVar
  • mainClassName
  • executableDir
  • defaultJvmOpts
  • appNameSystemProperty
  • appHomeRelativePath
  • classpath

Example:

 task createStartScripts(type: CreateStartScripts) { unixStartScriptGenerator.template = resources.text.fromFile('customUnixStartScript.txt') windowsStartScriptGenerator.template = resources.text.fromFile('customWindowsStartScript.txt') } 

org.gradle.api.tasks.application.CreateStartScripts

Creates start scripts for launching JVM applications.

Example:

 task createStartScripts(type: CreateStartScripts) { outputDir = file('build/sample') mainClassName = 'org.gradle.test.Main' applicationName = 'myApp' classpath = files('path/to/some.jar') } 

Note: the Gradle "application" plugin adds a pre-configured task of this type named "startScripts".

The task generates separate scripts targeted at Microsoft Windows environments and UNIX-like environments (e.g. Linux, macOS). The actual generation is implemented by the #getWindowsStartScriptGenerator() and #getUnixStartScriptGenerator() properties, of type org.gradle.jvm.application.scripts.ScriptGenerator.

Example:

 task createStartScripts(type: CreateStartScripts) { unixStartScriptGenerator = new CustomUnixStartScriptGenerator() windowsStartScriptGenerator = new CustomWindowsStartScriptGenerator() } class CustomUnixStartScriptGenerator implements ScriptGenerator { void generateScript(JavaAppStartScriptGenerationDetails details, Writer destination) { // implementation } } class CustomWindowsStartScriptGenerator implements ScriptGenerator { void generateScript(JavaAppStartScriptGenerationDetails details, Writer destination) { // implementation } } 

The default generators are of the type org.gradle.jvm.application.scripts.TemplateBasedScriptGenerator, with default templates. This templates can be changed via the org.gradle.jvm.application.scripts.TemplateBasedScriptGenerator#setTemplate(org.gradle.api.resources.TextResource) method.

The default implementations used by this task use Groovy's SimpleTemplateEngine to parse the template, with the following variables available:

  • applicationName
  • optsEnvironmentVar
  • exitEnvironmentVar
  • mainClassName
  • defaultJvmOpts
  • appNameSystemProperty
  • appHomeRelativePath
  • classpath

Example:

 task createStartScripts(type: CreateStartScripts) { unixStartScriptGenerator.template = resources.text.fromFile('customUnixStartScript.txt') windowsStartScriptGenerator.template = resources.text.fromFile('customWindowsStartScript.txt') } 

org.gradle.nativeplatform.tasks.CreateStaticLibrary

Assembles a static library from object files.

org.gradle.api.credentials.Credentials

Base interface for credentials used for different authentication purposes. (e.g authenticated org.gradle.api.artifacts.dsl.RepositoryHandler)

org.gradle.api.reporting.CustomizableHtmlReport

A HTML Report whose generation can be customized with a XSLT stylesheet.

org.gradle.api.tasks.compile.DebugOptions

Debug options for Java compilation. Only take effect if CompileOptions#debug is set to true.

org.gradle.plugins.signing.type.DefaultSignatureTypeProvider

The default SignatureTypeProvider implementation including support for BinarySignatureType and ArmoredSignatureType signatures.

org.gradle.api.DefaultTask

DefaultTask is the standard Task implementation. You can extend this to implement your own task types.

org.gradle.model.Defaults

Denotes that the RuleSource method rule carrying this annotation initializes the rule subject with default values.

Default rules execute first for a given subject, just after the subject has been created but before Model rules and Mutate rules. The first parameter of the rule is the rule subject, which is mutable for the duration of the rule.

Please see RuleSource for more information on method rules.

org.gradle.api.plugins.DeferredConfigurable

Indicates that the annotated object is designed to be configured only once, and that changes to configuration inputs made after configuration should not be allowed.

org.gradle.api.tasks.Delete

Deletes files or directories. Example:

 task makePretty(type: Delete) { delete 'uglyFolder', 'uglyFile' followSymlinks = true } 
Be default symlinks will not be followed when deleting files. To change this behavior call Delete#setFollowSymlinks(boolean) with true. On systems that do not support symlinks, this will have no effect.

org.gradle.api.file.DeleteSpec

A specification for deleting files from the filesystem.

org.gradle.api.artifacts.DependenciesMetadata

Describes metadata about a dependency - direct dependencies or dependency constraints - declared in a resolved component's metadata.

org.gradle.tooling.model.Dependency

Represents an artifact dependency.

org.gradle.plugins.ide.idea.model.Dependency

Represents a dependency of an IDEA module.

org.gradle.api.artifacts.Dependency

A Dependency represents a dependency on the artifacts from a particular source. A source can be an Ivy module, a Maven POM, another Gradle project, a collection of Files, etc... A source can have zero or more artifacts.

org.gradle.api.artifacts.DependencyArtifact

An Artifact represents an artifact included in a org.gradle.api.artifacts.Dependency.

An artifact is an (immutable) value object.

org.gradle.api.artifacts.DependencyConstraint

Represents a constraints over all, including transitive, dependencies.

org.gradle.api.artifacts.dsl.DependencyConstraintHandler

A DependencyConstraintHandler is used to declare dependency constraints.

org.gradle.api.artifacts.DependencyConstraintMetadata

Describes a dependency constraint declared in a resolved component's metadata, which typically originates from a component descriptor (Gradle metadata file). This interface can be used to adjust a dependency constraint's properties via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

org.gradle.api.artifacts.DependencyConstraintSet

A set of dependency constraint definitions that are associated with a configuration.

org.gradle.api.artifacts.DependencyConstraintsMetadata

Describes the dependency constraints of a variant declared in a resolved component's metadata, which typically originate from a component descriptor (Gradle metadata file). This interface can be used to adjust the dependencies of a published component via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

org.gradle.api.artifacts.dsl.DependencyHandler (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.artifacts.dsl.DependencyHandler

A DependencyHandler is used to declare dependencies. Dependencies are grouped into configurations (see org.gradle.api.artifacts.Configuration).

To declare a specific dependency for a configuration you can use the following syntax:

 dependencies { configurationName dependencyNotation1, dependencyNotation2, ... } 

Example shows a basic way of declaring dependencies.

 apply plugin: 'java' //so that we can use 'compile', 'testCompile' for dependencies dependencies { //for dependencies found in artifact repositories you can use //the group:name:version notation compile 'commons-lang:commons-lang:2.6' testCompile 'org.mockito:mockito:1.9.0-rc1' //map-style notation: compile group: 'com.google.code.guice', name: 'guice', version: '1.0' //declaring arbitrary files as dependencies compile files('hibernate.jar', 'libs/spring.jar') //putting all jars from 'libs' onto compile classpath compile fileTree('libs') } 
Advanced dependency configuration

To do some advanced configuration on a dependency when it is declared, you can additionally pass a configuration closure:

 dependencies { configurationName(dependencyNotation){ configStatement1 configStatement2 } } 
Examples of advanced dependency declaration including:
 apply plugin: 'java' //so that I can declare 'compile' dependencies dependencies { compile('org.hibernate:hibernate:3.1') { //in case of versions conflict '3.1' version of hibernate wins: force = true //excluding a particular transitive dependency: exclude module: 'cglib' //by artifact name exclude group: 'org.jmock' //by group exclude group: 'org.unwanted', module: 'iAmBuggy' //by both name and group //disabling all transitive dependencies of this dependency transitive = false } } 
More examples of advanced configuration, useful when dependency module has multiple artifacts:
 apply plugin: 'java' //so that I can declare 'compile' dependencies dependencies { //configuring dependency to specific configuration of the module compile configuration: 'someConf', group: 'org.someOrg', name: 'someModule', version: '1.0' //configuring dependency on 'someLib' module compile(group: 'org.myorg', name: 'someLib', version:'1.0') { //explicitly adding the dependency artifact: artifact { //useful when some artifact properties unconventional name = 'someArtifact' //artifact name different than module name extension = 'someExt' type = 'someType' classifier = 'someClassifier' } } } 
Dependency notations

There are several supported dependency notations. These are described below. For each dependency declared this way, a Dependency object is created. You can use this object to query or further configure the dependency.

You can also always add instances of org.gradle.api.artifacts.Dependency directly:

configurationName <instance> External dependencies

There are two notations supported for declaring a dependency on an external module. One is a string notation formatted this way:

configurationName "group:name:version:classifier@extension"

The other is a map notation:

configurationName group: group, name: name, version: version, classifier: classifier, ext: extension

In both notations, all properties, except name, are optional.

External dependencies are represented by a .

 apply plugin: 'java' //so that we can use 'compile', 'testCompile' for dependencies dependencies { //for dependencies found in artifact repositories you can use //the string notation, e.g. group:name:version compile 'commons-lang:commons-lang:2.6' testCompile 'org.mockito:mockito:1.9.0-rc1' //map notation: compile group: 'com.google.code.guice', name: 'guice', version: '1.0' } 
Project dependencies

To add a project dependency, you use the following notation:

configurationName project(':someProject')

The notation project(':projectA') is similar to the syntax you use when configuring a projectA in a multi-module gradle project.

By default, when you declare dependency to projectA, you actually declare dependency to the 'default' configuration of the projectA. If you need to depend on a specific configuration of projectA, use map notation for projects:

configurationName project(path: ':projectA', configuration: 'someOtherConfiguration')

Project dependencies are represented using a org.gradle.api.artifacts.ProjectDependency.

File dependencies

You can also add a dependency using a org.gradle.api.file.FileCollection:

configurationName files('a file')
 apply plugin: 'java' //so that we can use 'compile', 'testCompile' for dependencies dependencies { //declaring arbitrary files as dependencies compile files('hibernate.jar', 'libs/spring.jar') //putting all jars from 'libs' onto compile classpath compile fileTree('libs') } 

File dependencies are represented using a org.gradle.api.artifacts.SelfResolvingDependency.

Dependencies to other configurations

You can add a dependency using a org.gradle.api.artifacts.Configuration.

When the configuration is from the same project as the target configuration, the target configuration is changed to extend from the provided configuration.

When the configuration is from a different project, a project dependency is added.

Gradle distribution specific dependencies

It is possible to depend on certain Gradle APIs or libraries that Gradle ships with. It is particularly useful for Gradle plugin development. Example:

 //Our Gradle plugin is written in groovy apply plugin: 'groovy' //now we can use the 'compile' configuration for declaring dependencies dependencies { //we will use the Groovy version that ships with Gradle: compile localGroovy() //our plugin requires Gradle API interfaces and classes to compile: compile gradleApi() //we will use the Gradle test-kit to test build logic: testCompile gradleTestKit() } 
Client module dependencies

To add a client module to a configuration you can use the notation:

configurationName module(moduleNotation) { module dependencies } 
The module notation is the same as the dependency notations described above, except that the classifier property is not available. Client modules are represented using a org.gradle.api.artifacts.ClientModule.

org.gradle.kotlin.dsl.DependencyHandlerScope

Receiver for dependencies block providing convenient utilities for configuring dependencies.

org.gradle.api.tasks.diagnostics.DependencyInsightReportTask

Generates a report that attempts to answer questions like:

  • Why is this dependency in the dependency graph?
  • Exactly which dependencies are pulling this dependency into the graph?
  • What is the actual version (i.e. *selected* version) of the dependency that will be used? Is it the same as what was *requested*?
  • Why is the *selected* version of a dependency different to the *requested*?
Use this task to get insight into a particular dependency (or dependencies) and find out what exactly happens during dependency resolution and conflict resolution. If the dependency version was forced or selected by the conflict resolution this information will be available in the report.

While the regular dependencies report (DependencyReportTask) shows the path from the top level dependencies down through the transitive dependencies, the dependency insight report shows the path from a particular dependency to the dependencies that pulled it in. That is, it is an inverted view of the regular dependencies report.

The task requires setting the dependency spec and the configuration. For more information on how to configure those please refer to docs for DependencyInsightReportTask#setDependencySpec(Object) and DependencyInsightReportTask#setConfiguration(String).

The task can also be configured from the command line. For more information please refer to DependencyInsightReportTask#setDependencySpec(Object) and DependencyInsightReportTask#setConfiguration(String)

org.gradle.api.artifacts.dsl.DependencyLockingHandler

A DependencyLockingHandler manages the behaviour and configuration of dependency locking.

org.gradle.api.artifacts.DependencyMetadata

Describes a metadata about a dependency - direct dependency or dependency constraint - declared in a resolved component's metadata.

org.gradle.api.reporting.dependencies.DependencyReportContainer

The set of reports that can be generated by the HtmlDependencyReportTask task type.

org.gradle.api.tasks.diagnostics.DependencyReportTask

Displays the dependency tree for a project. An instance of this type is used when you execute the dependencies task from the command-line.

org.gradle.api.artifacts.DependencyResolutionListener

A DependencyResolutionListener is notified as dependencies are resolved.

org.gradle.api.artifacts.DependencyResolveDetails

Provides details about a dependency when it is resolved. Provides means to manipulate dependency metadata when it is resolved.

org.gradle.api.artifacts.result.DependencyResult

An edge in the dependency graph. Provides information about the origin of the dependency and the requested component.

org.gradle.api.artifacts.DependencySet

A set of artifact dependencies.

org.gradle.platform.base.DependencySpec

A dependency onto a Gradle component.

org.gradle.platform.base.DependencySpecBuilder

A builder of a DependencySpec. Implementations are required to return immutable dependency specs.

org.gradle.platform.base.DependencySpecContainer

A container for dependency specifications.

org.gradle.api.artifacts.DependencySubstitution

Provides means to substitute a different dependency during resolution.

org.gradle.api.artifacts.DependencySubstitutions

Allows replacing dependencies with other dependencies.

org.gradle.api.reporting.dependents.DependentComponentsReport

Displays dependent components.

org.gradle.language.nativeplatform.DependentSourceSet

A source set that depends on one or more org.gradle.nativeplatform.NativeDependencySets to be built.

org.gradle.language.base.DependentSourceSet

A source set that can have dependencies on other Libraries.

org.gradle.plugins.ear.descriptor.DeploymentDescriptor

A deployment descriptor such as application.xml.

org.gradle.api.Describable

Types can implement this interface when they provide a human-readable display name. It is strongly encouraged to compute this display name lazily: computing a display name, even if it's only a string concatenation, can take a significant amount of time during configuration for something that would only be used, typically, in error messages.

org.gradle.api.tasks.Destroys

Marks a property as specifying a file or directory that a task destroys.

This annotation should be attached to the getter method or the field for the property.

This will cause the task to have exclusive access to this file or directory while running. This means that other tasks that either create or consume this file (by specifying the file or directory as an input or output) cannot execute concurrently with a task that destroys this file.

org.gradle.authentication.http.DigestAuthentication

Authentication scheme for digest access authentication over HTTP.

org.gradle.api.artifacts.DirectDependenciesMetadata

Describes the dependencies of a variant declared in a resolved component's metadata, which typically originate from a component descriptor (Gradle metadata file, Ivy file, Maven POM). This interface can be used to adjust the dependencies of a published component via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

org.gradle.api.artifacts.DirectDependencyMetadata

Describes a dependency declared in a resolved component's metadata, which typically originates from a component descriptor (Gradle metadata file, Ivy file, Maven POM). This interface can be used to adjust a dependency's properties via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

org.gradle.api.file.Directory

Represents a directory at some fixed location on the file system.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the #dir(String) method or using various methods on ProjectLayout such as ProjectLayout#getProjectDirectory().

org.gradle.caching.local.DirectoryBuildCache

Configuration object for the local directory build cache.

org.gradle.api.file.DirectoryProperty

Represents some configurable directory location, whose value is mutable and is not necessarily currently known until later.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the ProjectLayout#directoryProperty() method.

org.gradle.api.reporting.DirectoryReport

A directory based report to be created.

org.gradle.api.file.DirectoryTree

A directory with some associated include and exclude patterns.

This interface does not allow mutation. However, the actual implementation may not be immutable.

org.gradle.api.file.DirectoryVar

Represents some configurable directory location, whose value is mutable and is not necessarily currently known until later.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the ProjectLayout#newDirectoryVar() method.

org.gradle.api.attributes.DisambiguationRuleChain

A chain of disambiguation rules. By default the chain is empty and will not do any disambiguation.

For a given set of rules, the execution is done in order, and interrupts as soon as a rule selected at least one candidate (through MultipleCandidatesDetails#closestMatch(Object)).

If the end of the rule chain is reached and that no rule selected a candidate then the candidate list is returned unmodified, meaning we still have an ambiguous match.

org.gradle.api.distribution.Distribution

A distribution allow to bundle an application or a library including dependencies,sources...

org.gradle.api.distribution.DistributionContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.distribution.DistributionContainer

A DistributionContainer manages a set of Distribution objects.

org.gradle.api.distribution.plugins.DistributionPlugin

A Plugin to package project as a distribution.

org.gradle.api.DomainObjectCollection (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.DomainObjectCollection

A DomainObjectCollection is a specialised Collection that adds the ability to receive modification notifications and use live filtered sub collections.

The filtered collections returned by the filtering methods, such as #matching(Closure), return collections that are live. That is, they reflect changes made to the source collection that they were created from. This is true for filtered collections made from filtered collections etc.

You can also add actions which are executed as elements are added to the collection. Actions added to filtered collections will be fired if an addition/removal occurs for the source collection that matches the filter.

org.gradle.tooling.model.DomainObjectSet

A set of domain objects of type T.

org.gradle.api.DomainObjectSet

A DomainObjectSet is a specialisation of DomainObjectCollection that guarantees Set semantics.

org.gradle.api.file.DuplicateFileCopyingException

Thrown when more than one file with the same relative path name is to be copied and the DuplicatesStrategy is set to DuplicatesStrategy.FAIL

org.gradle.api.file.DuplicatesStrategy

Strategies for dealing with the potential creation of duplicate files for or archive entries.

org.gradle.model.Each

Signals that a RuleSource rule should be applied to all matching descendant elements of the scope instead of the scope itself.

org.gradle.plugins.ear.Ear

Assembles an EAR archive.

org.gradle.plugins.ear.descriptor.EarModule

A module element in a deployment descriptor like application.xml.

org.gradle.plugins.ear.EarPlugin

A Plugin with tasks which assemble a web application into a EAR file.

org.gradle.plugins.ear.EarPluginConvention (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.ear.EarPluginConvention

Ear Plugin Convention.

org.gradle.plugins.ear.descriptor.EarSecurityRole

A security-role element in a deployment descriptor like application.xml.

org.gradle.plugins.ear.descriptor.EarWebModule

A module element in a deployment descriptor like application.xml that has a web child element.

org.gradle.tooling.model.eclipse.EclipseBuildCommand

An Eclipse build command is a reference to a project builder object which automatically executes whenever a resource in the associate project changes.

org.gradle.plugins.ide.eclipse.model.EclipseClasspath

The build path settings for the generated Eclipse project. Used by the org.gradle.plugins.ide.eclipse.GenerateEclipseClasspath task to generate an Eclipse .classpath file.

The following example demonstrates the various configuration options. Keep in mind that all properties have sensible defaults; only configure them explicitly if the defaults don't match your needs.

 apply plugin: 'java' apply plugin: 'eclipse' configurations { provided someBoringConfig } eclipse { //if you want parts of paths in resulting file to be replaced by variables (files): pathVariables 'GRADLE_HOME': file('/best/software/gradle'), 'TOMCAT_HOME': file('../tomcat') classpath { //you can tweak the classpath of the Eclipse project by adding extra configurations: plusConfigurations += [ configurations.provided ] //you can also remove configurations from the classpath: minusConfigurations += [ configurations.someBoringConfig ] //if you want to append extra containers: containers 'someFriendlyContainer', 'andYetAnotherContainer' //customizing the classes output directory: defaultOutputDir = file('build-eclipse') //default settings for downloading sources and Javadoc: downloadSources = true downloadJavadoc = false } } 
For tackling edge cases, users can perform advanced configuration on the resulting XML file. It is also possible to affect the way that the Eclipse plugin merges the existing configuration via beforeMerged and whenMerged closures.

The beforeMerged and whenMerged closures receive a Classpath object.

Examples of advanced configuration:

 apply plugin: 'java' apply plugin: 'eclipse' eclipse { classpath { file { //if you want to mess with the resulting XML in whatever way you fancy withXml { def node = it.asNode() node.appendNode('xml', 'is what I love') } //closure executed after .classpath content is loaded from existing file //but before gradle build information is merged beforeMerged { classpath -> //you can tinker with the Classpath here } //closure executed after .classpath content is loaded from existing file //and after gradle build information is merged whenMerged { classpath -> //you can tinker with the Classpath here } } } } 

org.gradle.tooling.model.eclipse.EclipseClasspathContainer

Eclipse classpath entry used by third-party plugins to contribute to the project's classpath.

org.gradle.tooling.model.eclipse.EclipseClasspathEntry

An element that can have classpath attributes.

org.gradle.tooling.model.eclipse.EclipseExternalDependency

Represents an Eclipse-specific external artifact dependency.

org.gradle.tooling.model.eclipse.EclipseJavaSourceSettings

Describes Eclipse Java source settings for compiling and running some Java source code.

org.gradle.plugins.ide.eclipse.model.EclipseJdt

Enables fine-tuning jdt details of the Eclipse plugin

 apply plugin: 'java' apply plugin: 'eclipse' eclipse { jdt { //if you want to alter the java versions (by default they are configured with gradle java plugin settings): sourceCompatibility = 1.6 targetCompatibility = 1.5 javaRuntimeName = "J2SE-1.5" file { //whenMerged closure is the highest voodoo //and probably should be used only to solve tricky edge cases. //the type passed to the closure is Jdt //closure executed after jdt file content is loaded from existing file //and after gradle build information is merged whenMerged { jdt //you can tinker with the Jdt here } //withProperties allows addition of properties not currently //modeled by Gradle withProperties { properties -> //you can tinker with the java.util.Properties here } } } } 

org.gradle.tooling.model.eclipse.EclipseLinkedResource

Linked resources are files and folders that are stored in locations in the file system outside of the project's location.

org.gradle.plugins.ide.eclipse.model.EclipseModel (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.ide.eclipse.model.EclipseModel

DSL-friendly model of the Eclipse project information. First point of entry for customizing Eclipse project generation.

 apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'eclipse-wtp' //for web projects only eclipse { pathVariables 'GRADLE_HOME': file('/best/software/gradle'), 'TOMCAT_HOME': file('../tomcat') project { //see docs for EclipseProject } classpath { //see docs for EclipseClasspath } wtp { //see docs for EclipseWtp } } 
More examples in docs for EclipseProject, EclipseClasspath, EclipseWtp

org.gradle.tooling.model.eclipse.EclipseOutputLocation

The output location of an Eclipse project.

org.gradle.plugins.ide.eclipse.EclipsePlugin

A plugin which generates Eclipse files.

org.gradle.tooling.model.eclipse.EclipseProject

The complete model of an Eclipse project.

Note that the names of Eclipse projects are unique, and can be used as an identifier for the project.

org.gradle.plugins.ide.eclipse.model.EclipseProject

Enables fine-tuning project details (.project file) of the Eclipse plugin

Example of use with a blend of all possible properties. Bear in mind that usually you don't have configure eclipse project directly because Gradle configures it for free!

 apply plugin: 'java' apply plugin: 'eclipse' eclipse { project { //if you don't like the name Gradle has chosen name = 'someBetterName' //if you want to specify the Eclipse project's comment comment = 'Very interesting top secret project' //if you want to append some extra referenced projects in a declarative fashion: referencedProjects 'someProject', 'someOtherProject' //if you want to assign referenced projects referencedProjects = ['someProject'] as Set //if you want to append some extra natures in a declarative fashion: natures 'some.extra.eclipse.nature', 'some.another.interesting.nature' //if you want to assign natures in a groovy fashion: natures = ['some.extra.eclipse.nature', 'some.another.interesting.nature'] //if you want to append some extra build command: buildCommand 'buildThisLovelyProject' //if you want to append a build command with parameters: buildCommand 'buildItWithTheArguments', argumentOne: "I'm first", argumentTwo: "I'm second" //if you want to create an extra link in the eclipse project, //by location uri: linkedResource name: 'someLinkByLocationUri', type: 'someLinkType', locationUri: 'file://someUri' //by location: linkedResource name: 'someLinkByLocation', type: 'someLinkType', location: '/some/location' //if you don't want any node_modules folder to appear in Eclipse, you can filter it out: resourceFilter { appliesTo = 'FOLDERS' type = 'EXCLUDE_ALL' matcher { id = 'org.eclipse.ui.ide.multiFilter' arguments = '1.0-name-matches-false-false-node_modules' } } } } 
For tackling edge cases users can perform advanced configuration on resulting XML file. It is also possible to affect the way eclipse plugin merges the existing configuration via beforeMerged and whenMerged closures.

beforeMerged and whenMerged closures receive Project object

Examples of advanced configuration:

 apply plugin: 'java' apply plugin: 'eclipse' eclipse { project { file { //if you want to mess with the resulting XML in whatever way you fancy withXml { def node = it.asNode() node.appendNode('xml', 'is what I love') } //closure executed after .project content is loaded from existing file //but before gradle build information is merged beforeMerged { project -> //if you want skip merging natures... (a very abstract example) project.natures.clear() } //closure executed after .project content is loaded from existing file //and after gradle build information is merged whenMerged { project -> //you can tinker with the Project here } } } } 

org.gradle.tooling.model.eclipse.EclipseProjectDependency

Represents a dependency on another Eclipse project.

org.gradle.tooling.model.eclipse.EclipseProjectNature

An Eclipse project nature definition.

org.gradle.tooling.model.eclipse.EclipseSourceDirectory

A source directory in an Eclipse project.

org.gradle.plugins.ide.eclipse.model.EclipseWtp

Enables fine-tuning wtp/wst details of the Eclipse plugin

For projects applying the eclipse plugin and either one of the ear or war plugins, this plugin is auto-applied.

More interesting examples you will find in docs for EclipseWtpComponent and EclipseWtpFacet

 apply plugin: 'war' //or 'ear' or 'java' apply plugin: 'eclipse-wtp' eclipse { //if you want parts of paths in resulting file(s) to be replaced by variables (files): pathVariables 'GRADLE_HOME': file('/best/software/gradle'), 'TOMCAT_HOME': file('../tomcat') wtp { component { //for examples see docs for EclipseWtpComponent } facet { //for examples see docs for EclipseWtpFacet } } } 

org.gradle.plugins.ide.eclipse.model.EclipseWtpComponent

Enables fine-tuning wtp component details of the Eclipse plugin

Example of use with a blend of all possible properties. Bear in mind that usually you don't have to configure them directly because Gradle configures it for free!

 apply plugin: 'war' //or 'ear' or 'java' apply plugin: 'eclipse-wtp' configurations { someInterestingConfiguration anotherConfiguration } eclipse { //if you want parts of paths in resulting file(s) to be replaced by variables (files): pathVariables 'GRADLE_HOME': file('/best/software/gradle'), 'TOMCAT_HOME': file('../tomcat') wtp { component { //you can configure the context path: contextPath = 'someContextPath' //you can configure the deployName: deployName = 'killerApp' //you can alter the wb-resource elements. //non-existing source dirs won't be added to the component file. sourceDirs += file('someExtraFolder') // dependencies to mark as deployable with lib folder deploy path libConfigurations += [ configurations.someInterestingConfiguration ] // dependencies to mark as deployable with root folder deploy path rootConfigurations += [ configurations.someInterestingConfiguration ] // dependencies to exclude from wtp deployment minusConfigurations << configurations.anotherConfiguration //you can add a wb-resource elements; mandatory keys: 'sourcePath', 'deployPath': //if sourcePath points to non-existing folder it will *not* be added. resource sourcePath: 'extra/resource', deployPath: 'deployment/resource' //you can add a wb-property elements; mandatory keys: 'name', 'value': property name: 'moodOfTheDay', value: ':-D' } } } 
For tackling edge cases users can perform advanced configuration on resulting XML file. It is also possible to affect the way eclipse plugin merges the existing configuration via beforeMerged and whenMerged closures.

beforeMerged and whenMerged closures receive WtpComponent object

Examples of advanced configuration:

 apply plugin: 'war' apply plugin: 'eclipse-wtp' eclipse { wtp { component { file { //if you want to mess with the resulting XML in whatever way you fancy withXml { def node = it.asNode() node.appendNode('xml', 'is what I love') } //closure executed after wtp component file content is loaded from existing file //but before gradle build information is merged beforeMerged { wtpComponent -> //tinker with WtpComponent here } //closure executed after wtp component file content is loaded from existing file //and after gradle build information is merged whenMerged { wtpComponent -> //you can tinker with the WtpComponent here } } } } } 

org.gradle.plugins.ide.eclipse.model.EclipseWtpFacet

Enables fine-tuning wtp facet details of the Eclipse plugin

Advanced configuration closures beforeMerged and whenMerged receive WtpFacet object as parameter.

 apply plugin: 'war' //or 'ear' or 'java' apply plugin: 'eclipse-wtp' eclipse { wtp { facet { //you can add some extra wtp facets; mandatory keys: 'name', 'version': facet name: 'someCoolFacet', version: '1.3' file { //if you want to mess with the resulting XML in whatever way you fancy withXml { def node = it.asNode() node.appendNode('xml', 'is what I love') } //beforeMerged and whenMerged closures are the highest voodoo for the tricky edge cases. //the type passed to the closures is WtpFacet //closure executed after wtp facet file content is loaded from existing file //but before gradle build information is merged beforeMerged { wtpFacet -> //tinker with WtpFacet here } //closure executed after wtp facet file content is loaded from existing file //and after gradle build information is merged whenMerged { wtpFacet -> //you can tinker with the WtpFacet here } } } } } 

org.gradle.plugins.ide.eclipse.EclipseWtpPlugin

A plugin which configures the Eclipse Web Tools Platform.

org.gradle.tooling.model.Element

Described model element.

org.gradle.kotlin.dsl.plugins.embedded.EmbeddedKotlinPlugin

The embedded-kotlin plugin.

org.gradle.api.file.EmptyFileVisitor

The EmptyFileVisitor can be extends by implementations that only require to implement one of the 2 visit methods (dir or file). This is just to limit the amount of code clutter when not both visit methods need to be implemented.

org.gradle.plugins.javascript.envjs.EnvJsExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.javascript.envjs.EnvJsExtension
org.gradle.plugins.javascript.envjs.EnvJsPlugin
org.gradle.api.artifacts.ExcludeRule

An ExcludeRule is used to describe transitive dependencies that should be excluded when resolving dependencies.

org.gradle.api.artifacts.ExcludeRuleContainer

A container for adding exclude rules for dependencies.

org.gradle.api.tasks.Exec

Executes a command line process. Example:

 task stopTomcat(type:Exec) { workingDir '../tomcat/bin' //on windows: commandLine 'cmd', '/c', 'stop.bat' //on linux commandLine './stop.sh' //store the output instead of printing to the console: standardOutput = new ByteArrayOutputStream() //extension method stopTomcat.output() can be used to obtain the output: ext.output = { return standardOutput.toString() } } 

org.gradle.process.ExecResult

Represents the result of running an external process.

org.gradle.process.ExecSpec

Specified the options for executing some command.

org.gradle.api.ExtensiblePolymorphicDomainObjectContainer

A org.gradle.api.PolymorphicDomainObjectContainer that can be extended at runtime to create elements of new types.

org.gradle.api.plugins.ExtensionAware (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.ExtensionAware

Objects that can be extended at runtime with other objects.

 // Extensions are just plain objects, there is no interface/type class MyExtension { String foo MyExtension(String foo) { this.foo = foo } } // Add new extensions via the extension container project.extensions.create('custom', MyExtension, "bar") // («name», «type», «constructor args», …) // extensions appear as properties on the target object by the given name assert project.custom instanceof MyExtension assert project.custom.foo == "bar" // also via a namespace method project.custom { assert foo == "bar" foo = "other" } assert project.custom.foo == "other" // Extensions added with the extension container's create method are themselves extensible assert project.custom instanceof ExtensionAware project.custom.extensions.create("nested", MyExtension, "baz") assert project.custom.nested.foo == "baz" // All extension aware objects have a special “ext” extension of type ExtraPropertiesExtension assert project.hasProperty("myProperty") == false project.ext.myProperty = "myValue" // Properties added to the “ext” extension are promoted to the owning object assert project.myProperty == "myValue" 
Many Gradle objects are extension aware. This includes; projects, tasks, configurations, dependencies etc.

For more on adding & creating extensions, see ExtensionContainer.

For more on extra properties, see ExtraPropertiesExtension.

An ExtensionAware object has several 'scopes' that Gradle searches for properties. These scopes are:

  • The object itself. This scope includes any property getters and setters declared by the implementation class. The properties of this scope are readable or writable depending on the presence of the corresponding getter or setter method.
  • Groovy Meta-programming methods implemented by the object's class, like propertyMissing(). Care must be taken by plugin authors to ensure propertyMissing() is implemented such that if a property is not found a MissingPropertyException(String, Class) exception is thrown. If propertyMissing() always returns a value for any property, Gradle will not search the rest of the scopes below.
  • The extra properties of the object. Each object maintains a map of extra properties, which can contain any arbitrary name -> value pair. Once defined, the properties of this scope are readable and writable.
  • The extensions added to the object by plugins. Each extension is available as a read-only property with the same name as the extension.

org.gradle.api.plugins.ExtensionContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.ExtensionContainer

Allows adding 'namespaced' DSL extensions to a target object.

org.gradle.api.plugins.ExtensionsSchema

Schema of extensions.

org.gradle.tooling.model.ExternalDependency

Represents an external artifact dependency.

org.gradle.api.artifacts.ExternalDependency

An ExternalDependency is a Dependency on a source outside the current project hierarchy.

org.gradle.api.artifacts.ExternalModuleDependency

A ModuleDependency is a Dependency on a module outside the current project hierarchy.

org.gradle.api.plugins.ExtraPropertiesExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.ExtraPropertiesExtension

Additional, ad-hoc, properties for Gradle domain objects.

Extra properties extensions allow new properties to be added to existing domain objects. They act like maps, allowing the storage of arbitrary key/value pairs. All ExtensionAware Gradle domain objects intrinsically have an extension named “{@value #EXTENSION_NAME}” of this type.

An important feature of extra properties extensions is that all of its properties are exposed for reading and writing via the ExtensionAware object that owns the extension.

 project.ext.set("myProp", "myValue") assert project.myProp == "myValue" project.myProp = "anotherValue" assert project.myProp == "anotherValue" assert project.ext.get("myProp") == "anotherValue" 
Extra properties extension objects support Groovy property syntax. That is, a property can be read via extension.«name» and set via extension.«name» = "value". Wherever possible, the Groovy property syntax should be preferred over the #get(String) and #set(String, Object) methods.
 project.ext { myprop = "a" } assert project.myprop == "a" assert project.ext.myprop == "a" project.myprop = "b" assert project.myprop == "b" assert project.ext.myprop == "b" 
You can also use the Groovy accessor syntax to get and set properties on an extra properties extension.
 project.ext["otherProp"] = "a" assert project.otherProp == "a" assert project.ext["otherProp"] == "a" 
The exception that is thrown when an attempt is made to get the value of a property that does not exist is different depending on whether the Groovy syntax is used or not. If Groovy property syntax is used, the Groovy groovy.lang.MissingPropertyException will be thrown. When the #get(String) method is used, an UnknownPropertyException will be thrown.

org.gradle.nativeplatform.tasks.ExtractSymbols

Extracts the debug symbols from a binary and stores them in a separate file.

org.gradle.plugins.ide.eclipse.model.Facet

A project facet.

org.gradle.tooling.Failure

Represents a failure. Failures are similar to exceptions but carry less information (only a message, a description and a cause) so they can be used in a wider scope than just the JVM where the exception failed.

org.gradle.tooling.events.FailureResult

Describes how an operation finished with failures.

org.gradle.api.file.FileCollection

A FileCollection represents a collection of files which you can query in certain ways. A file collection is often used to define a classpath, or to add files to a container.

You can obtain a FileCollection instance using org.gradle.api.Project#files.

org.gradle.api.artifacts.FileCollectionDependency

A FileCollectionDependency is a Dependency on a collection of local files which are not stored in a repository.

org.gradle.plugins.ide.api.FileContentMerger

Models the generation/parsing/merging capabilities.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

org.gradle.api.file.FileCopyDetails

Provides details about a file or directory about to be copied, and allows some aspects of the destination file to be modified.

Using this interface, you can change the destination path of the file, filter the content of the file, or exclude the file from the result entirely.

Access to the source file itself after any filters have been added is not a supported operation.

org.gradle.api.tasks.FileNormalizer

A normalizer used to remove unwanted noise when considering file inputs. The default behavior without specifying a normalizer is to ignore the order of the files.

org.gradle.plugins.ide.idea.model.FilePath

A Path that keeps the reference to the File

org.gradle.plugins.ide.eclipse.model.FileReference

A reference to a file in eclipse.

org.gradle.api.file.FileSystemLocation

Represents some immutable location on the file system.

Note: This interface is not intended for implementation by build script or plugin authors.

org.gradle.api.file.FileTree

A FileTree represents a hierarchy of files. It extends FileCollection to add hierarchy query and manipulation methods. You typically use a FileTree to represent files to copy or the contents of an archive.

You can obtain a FileTree instance using org.gradle.api.Project#fileTree(java.util.Map), org.gradle.api.Project#zipTree(Object) or org.gradle.api.Project#tarTree(Object).

org.gradle.api.file.FileTreeElement

Information about a file in a FileTree.

org.gradle.api.file.FileVisitDetails

Provides access to details about a file or directory being visited by a FileVisitor.

org.gradle.api.file.FileVisitor

A FileVisitor is used to visit each of the files in a FileTree.

org.gradle.model.Finalize

Denotes that the RuleSource method rule carrying this annotation finalizes the rule subject.

Finalize rules execute after Mutate rules, but before Validate rules. The first parameter of the rule is the rule subject, which is mutable for the duration of the rule.

Please see RuleSource for more information on method rules.

org.gradle.api.plugins.quality.FindBugs

Analyzes code with FindBugs. See the FindBugs Manual for additional information on configuration options.

org.gradle.api.plugins.quality.FindBugsExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.quality.FindBugsExtension

Configuration options for the FindBugs plugin. All options have sensible defaults. See the FindBugs Manual for additional information on these options.

Below is a full configuration example. Since all properties have sensible defaults, typically only selected properties will be configured.

 apply plugin: "java" apply plugin: "findbugs" findbugs { toolVersion = "2.0.1" sourceSets = [sourceSets.main] ignoreFailures = true reportsDir = file("$project.buildDir/findbugsReports") effort = "max" showProgress = true reportLevel = "high" visitors = ["FindSqlInjection", "SwitchFallthrough"] omitVisitors = ["FindNonShortCircuit"] includeFilter = file("$rootProject.projectDir/config/findbugs/includeFilter.xml") excludeFilter = file("$rootProject.projectDir/config/findbugs/excludeFilter.xml") excludeBugsFilter = file("$rootProject.projectDir/config/findbugs/excludeBugsFilter.xml") } 

org.gradle.api.plugins.quality.FindBugsPlugin

A plugin for the FindBugs byte code analyzer.

Declares a findbugs configuration which needs to be configured with the FindBugs library to be used. Additional plugins can be added to the findbugsPlugins configuration.

For projects that have the Java (base) plugin applied, a FindBugs task is created for each source set.

org.gradle.api.plugins.quality.FindBugsReports

The reporting configuration for the FindBugs task. Only one of the reports can be enabled when the task executes. If more than one is enabled, an org.gradle.api.InvalidUserDataException will be thrown.

org.gradle.api.plugins.quality.FindBugsXmlReport

The single file XML report for FindBugs.

org.gradle.tooling.events.FinishEvent

An event that informs about an operation having finished its execution.

org.gradle.api.artifacts.repositories.FlatDirectoryArtifactRepository

A repository that looks into a number of directories for artifacts. The artifacts are expected to be located in the root of the specified directories. The repository ignores any group/organization information specified in the dependency section of your build script. If you only use this kind of resolver you can specify your dependencies like :junit:4.8.1 instead of junit:junit:4.8.1.

To resolve a dependency, this resolver looks for one of the following files. It will return the first match it finds:

  • [artifact]-[version].[ext]
  • [artifact]-[version]-[classifier].[ext]
  • [artifact].[ext]
  • [artifact]-[classifier].[ext]
So, for example, to resolve :junit:junit:4.8.1, this repository will look for junit-4.8.1.jar and then junit.jar.

org.gradle.nativeplatform.Flavor

Defines a custom variant that differentiate a NativeBinary.

org.gradle.nativeplatform.FlavorContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.nativeplatform.FlavorContainer

A container of Flavors.

If no flavor is explicitly configured, will contain a single Flavor named 'default'. Any flavors explicitly configured will overwrite the default flavor.

org.gradle.workers.ForkMode

Forking mode for workers.

org.gradle.api.tasks.compile.ForkOptions

Fork options for Java compilation. Only take effect if CompileOptions.fork is true.

org.gradle.language.base.FunctionalSourceSet

A container holding LanguageSourceSets with a similar function (production code, test code, etc.).

org.gradle.nativeplatform.toolchain.Gcc

The GNU GCC tool chain.

org.gradle.nativeplatform.toolchain.GccCommandLineToolConfiguration

An executable tool used for GCC that allows customizing the executable.

org.gradle.nativeplatform.toolchain.GccCompatibleToolChain

A ToolChain that can handle additional platforms simply by configuring the NativeBinary.

org.gradle.nativeplatform.toolchain.plugins.GccCompilerPlugin

A Plugin which makes the GNU GCC/G++ compiler available for compiling C/C++ code.

org.gradle.nativeplatform.toolchain.GccPlatformToolChain

GCC specific settings for the tools used to build for a particular platform.

org.gradle.platform.base.GeneralComponentSpec

A general purpose component specification, that can be used to represent some software component built from source and producing multiple output variants.

org.gradle.api.reporting.GenerateBuildDashboard

Generates build dashboard report.

org.gradle.nativeplatform.test.cunit.tasks.GenerateCUnitLauncher

Generated the Gradle CUnit launcher: main method and header.

org.gradle.plugins.ide.eclipse.GenerateEclipseClasspath

Generates an Eclipse .classpath file. If you want to fine tune the eclipse configuration

At this moment nearly all configuration is done via EclipseClasspath.

org.gradle.plugins.ide.eclipse.GenerateEclipseJdt

Generates the Eclipse JDT configuration file. If you want to fine tune the eclipse configuration

At this moment nearly all configuration is done via EclipseJdt.

org.gradle.plugins.ide.eclipse.GenerateEclipseProject

Generates an Eclipse .project file. If you want to fine tune the eclipse configuration

At this moment nearly all configuration is done via EclipseProject.

org.gradle.plugins.ide.eclipse.GenerateEclipseWtpComponent

Generates the org.eclipse.wst.common.component settings file for Eclipse WTP. If you want to fine tune the eclipse configuration

At this moment nearly all configuration is done via EclipseWtpComponent.

org.gradle.plugins.ide.eclipse.GenerateEclipseWtpFacet

Generates the org.eclipse.wst.common.project.facet.core settings file for Eclipse WTP. If you want to fine tune the eclipse configuration

At this moment nearly all configuration is done via EclipseWtpFacet.

org.gradle.ide.visualstudio.tasks.GenerateFiltersFileTask

Task for generating a filters file.

org.gradle.plugins.ide.idea.GenerateIdeaModule

Generates an IDEA module file. If you want to fine tune the idea configuration

Please refer to interesting examples on idea configuration in IdeaModule.

At this moment nearly all configuration is done via IdeaModule.

org.gradle.plugins.ide.idea.GenerateIdeaProject

Generates an IDEA project file for root project *only*. If you want to fine tune the idea configuration

At this moment nearly all configuration is done via IdeaProject.

org.gradle.plugins.ide.idea.GenerateIdeaWorkspace

Generates an IDEA workspace file *only* for root project. There's little you can configure about workspace generation at the moment.

org.gradle.api.publish.ivy.tasks.GenerateIvyDescriptor

Generates an Ivy XML Module Descriptor file.

org.gradle.api.publish.maven.tasks.GenerateMavenPom

Generates a Maven module descriptor (POM) file.

org.gradle.api.publish.tasks.GenerateModuleMetadata

Generates a Gradle metadata file to represent a published org.gradle.api.component.SoftwareComponent instance.

org.gradle.plugin.devel.tasks.GeneratePluginDescriptors

Generates plugin descriptors from plugin declarations.

org.gradle.ide.visualstudio.tasks.GenerateProjectFileTask

Task for generating a project file.

org.gradle.ide.xcode.tasks.GenerateSchemeFileTask

Task for generating a scheme file.

org.gradle.ide.visualstudio.tasks.GenerateSolutionFileTask

Task for generating a solution file.

org.gradle.swiftpm.tasks.GenerateSwiftPackageManagerManifest

A task that produces a Swift Package Manager manifest.

org.gradle.ide.xcode.tasks.GenerateWorkspaceSettingsFileTask

Task for generating a workspace settings file.

org.gradle.ide.xcode.tasks.GenerateXcodeProjectFileTask

Task for generating a project file.

org.gradle.ide.xcode.tasks.GenerateXcodeWorkspaceFileTask

Task for generating a workspace file.

org.gradle.plugins.ide.api.GeneratorTask

A GeneratorTask generates a configuration file based on a domain object of type T. When executed the task:

  • loads the object from the input file, if it exists.
  • Calls the beforeConfigured actions, passing the object to each action.
  • Configures the object in some task-specific way.
  • Calls the afterConfigured actions, passing the object to each action.
  • writes the object to the output file.

org.gradle.vcs.git.GitVersionControlSpec

A specification of a Git repository.

org.gradle.nativeplatform.test.googletest.plugins.GoogleTestConventionPlugin

A plugin that applies the GoogleTestPlugin and adds conventions on top of it.

org.gradle.nativeplatform.test.googletest.plugins.GoogleTestPlugin

A plugin that sets up the infrastructure for testing native binaries with GoogleTest.

org.gradle.nativeplatform.test.googletest.GoogleTestTestSuiteBinarySpec

An executable which run a Google Test test suite.

org.gradle.nativeplatform.test.googletest.GoogleTestTestSuiteSpec

Test suite of Google Test tests.

org.gradle.api.invocation.Gradle (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.invocation.Gradle

Represents an invocation of Gradle.

You can obtain a Gradle instance by calling Project#getGradle().

org.gradle.tooling.model.gradle.GradleBuild

Provides information about the structure of a Gradle build.

org.gradle.api.tasks.GradleBuild

Executes a Gradle build.

org.gradle.api.plugins.buildcomparison.gradle.GradleBuildInvocationSpec

A specification for launching a Gradle build with a specified Gradle version.

org.gradle.tooling.GradleConnectionException

Thrown when there is some problem using a Gradle connection.

org.gradle.tooling.GradleConnector

A GradleConnector is the main entry point to the Gradle tooling API. You use this API as follows:

  1. Call #newConnector() to create a new connector instance.
  2. Configure the connector. You must call #forProjectDirectory(java.io.File) to specify which project you wish to connect to. Other methods are optional.
  3. Call #connect() to create the connection to a project.
  4. When finished with the connection, call ProjectConnection#close() to clean up.

Example:

 ProjectConnection connection = GradleConnector.newConnector() .forProjectDirectory(new File("someProjectFolder")) .connect(); try { connection.newBuild().forTasks("tasks").run(); } finally { connection.close(); } 

The connection will use the version of Gradle that the target build is configured to use, for example in the Gradle wrapper properties file. When no Gradle version is defined for the build, the connection will use the tooling API's version as the Gradle version to run the build. Generally, you should avoid configuring a Gradle distribution or version and instead use the default provided by the tooling API.

Similarly, the connection will use the JVM and JVM arguments that the target build is configured to use, for example in the gradle.properties file. When no JVM or JVM arguments are defined for the build, the connection will use the current JVM and some default JVM arguments.

GradleConnector instances are not thread-safe. If you want to use a GradleConnector concurrently you must always create a new instance for each thread using #newConnector(). Note, however, the ProjectConnection instances that a connector creates are completely thread-safe.

Gradle version compatibility

The Tooling API is both forwards and backwards compatible with other versions of Gradle. It supports execution of Gradle builds that use older or newer versions of Gradle.

The current version of the Tooling API supports running builds using Gradle versions 1.2.

You should note that not all features of the Tooling API are available for all versions of Gradle. For example, build cancellation is only available for builds using Gradle 2.1 and later. Refer to the documentation for each class and method for more details.

The current Gradle version can be used from Tooling API versions 2.0 or later.

Java version compatibility

The Tooling API requires Java 8 or later. Java 7 is currently still supported but will be removed in Gradle 5.0. The Gradle version used by builds may have additional Java version requirements.

org.gradle.kotlin.dsl.GradleDsl

Delimits a Gradle DSL.

org.gradle.tooling.model.build.GradleEnvironment

Informs about the Gradle environment, for example the Gradle version.

See example in BuildEnvironment

org.gradle.api.GradleException

GradleException is the base class of all exceptions thrown by Gradle.

org.gradle.tooling.model.GradleModuleVersion

Informs about a module version, i.e. group, name, version.

org.gradle.plugin.devel.GradlePluginDevelopmentExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugin.devel.GradlePluginDevelopmentExtension

Configuration options for the org.gradle.plugin.devel.plugins.JavaGradlePluginPlugin.

Below is a full configuration example. Since all properties have sensible defaults, typically only selected properties will be configured.

 apply plugin: "java-gradle-plugin" gradlePlugin { pluginSourceSet project.sourceSets.customMain testSourceSets project.sourceSets.functionalTest plugins { helloPlugin { id = 'org.example.hello' implementationClass = 'org.example.HelloPlugin' } } } 

org.gradle.tooling.model.GradleProject

Represents a Gradle project.

org.gradle.tooling.model.gradle.GradlePublication

Represents some publication produced by a Gradle project, typically to a Maven or Ivy repository.

org.gradle.testkit.runner.GradleRunner

Executes a Gradle build, allowing inspection of the outcome.

A Gradle runner can be used to functionally test build logic, by executing a contrived build. Assertions can then be made on the outcome of the build, such as the state of files created by the build, or what tasks were actually executed during the build.

A runner can be created via the #create() method.

Typically, the test code using the runner will programmatically create a build (e.g. by writing Gradle build files to a temporary space) to execute. The build to execute is effectively specified by the #withProjectDir(File)} method. It is a requirement that a project directory be set.

The #withArguments(String...) method allows the build arguments to be specified, just as they would be on the command line.

The #build() method can be used to invoke the build when it is expected to succeed, while the #buildAndFail() method can be used when the build is expected to fail.

GradleRunner instances are not thread safe and cannot be used concurrently. However, multiple instances are able to be used concurrently.

Please see the Gradle TestKit User Guide chapter for more information.

org.gradle.tooling.model.gradle.GradleScript

Represents a Gradle script. A Gradle script may be a build script, settings script or initialization script.

org.gradle.api.GradleScriptException

A GradleScriptException is thrown when an exception occurs in the compilation or execution of a script.

org.gradle.tooling.model.GradleTask

Represents a task which is executable by Gradle.

org.gradle.api.plugins.GroovyBasePlugin

Extends org.gradle.api.plugins.JavaBasePlugin to provide support for compiling and documenting Groovy source files.

org.gradle.kotlin.dsl.GroovyBuilderScope

Provides a dynamic dispatching DSL with Groovy semantics for better integration with plugins that rely on Groovy builders such as the core maven plugin.

org.gradle.api.tasks.compile.GroovyCompile

Compiles Groovy source files, and optionally, Java source files.

org.gradle.api.tasks.compile.GroovyCompileOptions

Compilation options to be passed to the Groovy compiler.

org.gradle.api.tasks.compile.GroovyForkOptions

Fork options for Groovy compilation. Only take effect if GroovyCompileOptions.fork is true.

org.gradle.api.artifacts.maven.GroovyMavenDeployer

Adds Groovy configuration convenience methods on top of the MavenDeployer. This class provides also a builder for repository and snapshot-repository:

 mavenUploader.repository(url: 'file://repoDir') { authentication(userName: 'myName') releases(updatePolicy: 'never') snapshots(updatePolicy: 'always') } 
This call set the repository object and also returns an instance of this object. If you use 'snapshotRepository' instead of repository, the snapshot repository is build.

org.gradle.api.plugins.GroovyPlugin

A Plugin which extends the JavaPlugin to provide support for compiling and documenting Groovy source files.

org.gradle.api.tasks.GroovyRuntime (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.tasks.GroovyRuntime

Provides information related to the Groovy runtime(s) used in a project. Added by the org.gradle.api.plugins.GroovyBasePlugin as a project extension named groovyRuntime.

Example usage:

 apply plugin: "groovy" repositories { mavenCentral() } dependencies { compile "org.codehaus.groovy:groovy-all:2.1.2" } def groovyClasspath = groovyRuntime.inferGroovyClasspath(configurations.compile) // The returned class path can be used to configure the 'groovyClasspath' property of tasks // such as 'GroovyCompile' or 'Groovydoc', or to execute these and other Groovy tools directly. 

org.gradle.api.tasks.GroovySourceSet

A GroovySourceSetConvention defines the properties and methods added to a SourceSet by the .

org.gradle.api.tasks.javadoc.Groovydoc

Generates HTML API documentation for Groovy source, and optionally, Java source.

This task uses Groovy's Groovydoc tool to generate the API documentation. Please note that the Groovydoc tool has some limitations at the moment. The version of the Groovydoc that is used, is the one from the Groovy dependency defined in the build script.

org.gradle.api.attributes.HasAttributes

Represents something that carries attributes by utilizing an AttributeContainer

org.gradle.api.attributes.HasConfigurableAttributes

Represents something that carries attributes by utilizing an AttributeContainer that is configurable.

org.gradle.tooling.model.HasGradleProject

An element that is associated with a Gradle project. Via the Gradle project you can access (list, run, etc.) Gradle tasks.

org.gradle.api.HasImplicitReceiver

Marks a SAM interface as a target for lambda expressions / closures where the single parameter is passed as the implicit receiver of the invocation (this in Kotlin, delegate in Groovy) as if the lambda expression was an extension method of the parameter type.

 // copySpec(Action<CopySpec>) copySpec { from("./sources") // the given CopySpec is the implicit receiver } 

org.gradle.api.provider.HasMultipleValues

Represents a property whose value can be set using multiple elements of type T, such as a collection property.

Note: This interface is not intended for implementation by build script or plugin authors. You can use the factory methods on org.gradle.api.model.ObjectFactory to create instances of this interface.

org.gradle.api.reflect.HasPublicType

Allows a scriptable object, such as a project extension, to declare its preferred public type. The public type of an object is the one exposed to statically-typed consumers, such as Kotlin build scripts, by default.

org.gradle.language.nativeplatform.HeaderExportingSourceSet

A source set that exposes headers

org.gradle.api.plugins.HelpTasksPlugin

Adds various reporting tasks that provide information about the project.

org.gradle.tooling.model.eclipse.HierarchicalEclipseProject

Represents the basic information about an Eclipse project.

org.gradle.tooling.model.HierarchicalElement

Represents an element which belongs to some hierarchy.

org.gradle.api.reporting.dependencies.HtmlDependencyReportTask

Generates an HTML dependency report. This report combines the features of the ASCII dependency report and those of the ASCII dependency insight report. For a given project, it generates a tree of the dependencies of every configuration, and each dependency can be clicked to show the insight of this dependency.

This task generates a report for the task's containing project by default. But it can also generate a report for multiple projects, by setting the value of the projects property. Here's how to generate an HTML dependency report for all the projects of a multi-project build, for example:

 htmlDependencyReport { projects = project.allprojects } 

The report is generated in the build/reports/project/dependencies directory by default. This can also be changed by setting the reports.html.destination property:

 htmlDependencyReport { reports.html.destination = file("build/reports/project/dependencies") } 

org.gradle.caching.http.HttpBuildCache

Configuration object for the HTTP build cache. The build cache only supports BASIC authentication currently.

Cache entries are loaded via GET and stored via PUT requests.

For a GET request we expect a 200 or 404 response and for PUT we expect any 2xx response. Other responses are treated as recoverable or non-recoverable errors, depending on the status code. E.g. we treat authentication failures (401 and 409) as non-recoverable while an internal server error (500) is recoverable.

org.gradle.caching.http.HttpBuildCacheCredentials

Password credentials for a HTTP build cache backend.

org.gradle.plugins.javascript.envjs.http.HttpFileServer
org.gradle.plugins.javascript.envjs.http.HttpFileServerFactory
org.gradle.plugins.ide.IdeWorkspace

Represents an IDE "workspace" that is generated by Gradle and can be opened in the IDE.

org.gradle.tooling.model.idea.IdeaCompilerOutput

IDEA compiler output settings.

org.gradle.tooling.model.idea.IdeaContentRoot

Contains content root information.

org.gradle.tooling.model.idea.IdeaDependency

IDEA dependency.

org.gradle.tooling.model.idea.IdeaDependencyScope

The scope of the IDEA dependency.

org.gradle.tooling.model.idea.IdeaJavaLanguageSettings

Describes Java language settings for an IDEA module.

org.gradle.tooling.model.idea.IdeaLanguageLevel

Language level setting for IDEA.

org.gradle.plugins.ide.idea.model.IdeaLanguageLevel

Java language level used by IDEA projects.

org.gradle.plugins.ide.idea.model.IdeaModel (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.ide.idea.model.IdeaModel

DSL-friendly model of the IDEA project information. First point of entry when it comes to customizing the IDEA generation.

See the examples in docs for IdeaModule or IdeaProject.

org.gradle.tooling.model.idea.IdeaModule

Represents information about the IDEA module.

org.gradle.plugins.ide.idea.model.IdeaModule

Enables fine-tuning module details (*.iml file) of the IDEA plugin.

Example of use with a blend of most possible properties. Typically you don't have to configure this model directly because Gradle configures it for you.

 apply plugin: 'java' apply plugin: 'idea' //for the sake of this example, let's introduce a 'performanceTestCompile' configuration configurations { performanceTestCompile performanceTestCompile.extendsFrom(testCompile) } dependencies { //performanceTestCompile "some.interesting:dependency:1.0" } idea { //if you want parts of paths in resulting files (*.iml, etc.) to be replaced by variables (Files) pathVariables GRADLE_HOME: file('~/cool-software/gradle') module { //if for some reason you want to add an extra sourceDirs sourceDirs += file('some-extra-source-folder') //and some extra test source dirs testSourceDirs += file('some-extra-test-dir') //and some extra resource dirs resourceDirs += file('some-extra-resource-dir') //and some extra test resource dirs testResourceDirs += file('some-extra-test-resource-dir') //and hint to mark some of existing source dirs as generated sources generatedSourceDirs += file('some-extra-source-folder') //and some extra dirs that should be excluded by IDEA excludeDirs += file('some-extra-exclude-dir') //if you don't like the name Gradle has chosen name = 'some-better-name' //if you prefer different output folders inheritOutputDirs = false outputDir = file('muchBetterOutputDir') testOutputDir = file('muchBetterTestOutputDir') //if you prefer different SDK than the one inherited from IDEA project jdkName = '1.6' //put our custom test dependencies onto IDEA's TEST scope scopes.TEST.plus += [ configurations.performanceTestCompile ] //if 'content root' (as IDEA calls it) of the module is different contentRoot = file('my-module-content-root') //if you love browsing Javadoc downloadJavadoc = true //and hate reading sources :) downloadSources = false } } 
For tackling edge cases, users can perform advanced configuration on the resulting XML file. It is also possible to affect the way the IDEA plugin merges the existing configuration via beforeMerged and whenMerged closures.

beforeMerged and whenMerged closures receive a Module parameter

Examples of advanced configuration:

 apply plugin: 'java' apply plugin: 'idea' idea { module { iml { //if you like to keep *.iml in a secret folder generateTo = file('secret-modules-folder') //if you want to mess with the resulting XML in whatever way you fancy withXml { def node = it.asNode() node.appendNode('iLoveGradle', 'true') node.appendNode('butAlso', 'I find increasing pleasure tinkering with output *.iml contents. Yeah!!!') } //closure executed after *.iml content is loaded from existing file //but before gradle build information is merged beforeMerged { module -> //if you want skip merging exclude dirs module.excludeFolders.clear() } //closure executed after *.iml content is loaded from existing file //and after gradle build information is merged whenMerged { module -> //you can tinker with Module } } } } 

org.gradle.tooling.model.idea.IdeaModuleDependency

Dependency on a module in a project.

org.gradle.tooling.model.idea.IdeaModuleIdentifier

Identifies an Idea module.

org.gradle.plugins.ide.idea.model.IdeaModuleIml

Models the generation/parsing/merging capabilities of an IDEA module.

For examples, see docs for IdeaModule.

org.gradle.plugins.ide.idea.IdeaPlugin

Adds a GenerateIdeaModule task. When applied to a root project, also adds a GenerateIdeaProject task. For projects that have the Java plugin applied, the tasks receive additional Java-specific configuration.

org.gradle.tooling.model.idea.IdeaProject

Represents the information about the IDEA project.

org.gradle.plugins.ide.idea.model.IdeaProject

Enables fine-tuning project details (*.ipr file) of the IDEA plugin.

Example of use with a blend of all possible properties. Typically you don't have to configure IDEA module directly because Gradle configures it for you.

 import org.gradle.plugins.ide.idea.model.* apply plugin: 'java' apply plugin: 'idea' idea { project { //if you want to set specific jdk and language level jdkName = '1.6' languageLevel = '1.5' //you can update the source wildcards wildcards += '!?*.ruby' //you can configure the VCS used by the project vcs = 'Git' //you can change the modules of the *.ipr //modules = project(':someProject').idea.module //you can change the output file outputFile = new File(outputFile.parentFile, 'someBetterName.ipr') //you can add project-level libraries projectLibraries << new ProjectLibrary(name: "my-library", classes: [new File("path/to/library")]) } } 
For tackling edge cases users can perform advanced configuration on resulting XML file. It is also possible to affect the way IDEA plugin merges the existing configuration via beforeMerged and whenMerged closures.

beforeMerged and whenMerged closures receive Project object

Examples of advanced configuration:

 apply plugin: 'java' apply plugin: 'idea' idea { project { ipr { //you can tinker with the output *.ipr file before it's written out withXml { def node = it.asNode() node.appendNode('iLove', 'tinkering with the output *.ipr file!') } //closure executed after *.ipr content is loaded from existing file //but before gradle build information is merged beforeMerged { project -> //you can tinker with Project } //closure executed after *.ipr content is loaded from existing file //and after gradle build information is merged whenMerged { project -> //you can tinker with Project } } } } 

org.gradle.tooling.model.idea.IdeaSingleEntryLibraryDependency

"Single-Entry Module Library" as IDEA calls it. For example a single Jar file with sources Jar.

org.gradle.tooling.model.idea.IdeaSourceDirectory

IDEA source directory.

org.gradle.plugins.ide.idea.model.IdeaWorkspace

Enables fine-tuning workspace details (*.iws file) of the IDEA plugin.

At the moment, the only practical way of manipulating the resulting content is via the withXml hook:

 apply plugin: 'java' apply plugin: 'idea' idea.workspace.iws.withXml { provider -> provider.asNode().appendNode('gradleRocks', 'true') } 

org.gradle.api.IllegalDependencyNotation

This exceptions is thrown, if a dependency is declared with a illegal notation.

org.gradle.api.initialization.IncludedBuild

A build that is included in the composite.

org.gradle.api.tasks.scala.IncrementalCompileOptions

Options for incremental compilation of Scala code. Only used for compilation with Zinc.

org.gradle.api.tasks.incremental.IncrementalTaskInputs

Provides access to any input files that need to be processed by an incremental task.

An incremental task action is one that accepts a single IncrementalTaskInputs parameter. The task can then provide an action to execute for all input files that are out of date with respect to the previous execution of the task, and a separate action for all input files that have been removed since the previous execution.

 class IncrementalReverseTask extends DefaultTask { @InputDirectory def File inputDir @OutputDirectory def File outputDir @TaskAction void execute(IncrementalTaskInputs inputs) { if (!inputs.incremental) project.delete(outputDir.listFiles()) inputs.outOfDate { change -> def targetFile = project.file("$outputDir/${change.file.name}") targetFile.text = change.file.text.reverse() } inputs.removed { change -> def targetFile = project.file("$outputDir/${change.file.name}") if (targetFile.exists()) { targetFile.delete() } } } } 

In the case where Gradle is unable to determine which input files need to be reprocessed, then all of the input files will be reported as #outOfDate. Cases where this occurs include:

Note that this is a stateful API:

org.gradle.api.Incubating

Indicates that a feature is incubating. This means that the feature is currently a work-in-progress and may change at any time.

org.gradle.buildinit.tasks.InitBuild

Generates a Gradle project structure.

org.gradle.kotlin.dsl.InitScriptApi

Standard implementation of the API exposed to all types of Gradle scripts, precompiled and otherwise.

org.gradle.kotlin.dsl.InitialValueExtraPropertyDelegate

Enables typed access to extra properties with initial value.

org.gradle.kotlin.dsl.InitialValueExtraPropertyDelegateProvider
org.gradle.api.initialization.definition.InjectedPluginDependencies

The DSL for declaring plugins to inject into an included build. TODO: Plugins need to be located in this build's buildSrc.

org.gradle.api.initialization.definition.InjectedPluginDependency

Specification of a dependency on a plugin injected into an included build.

org.gradle.api.tasks.Input

Attached to a task property to indicate that the property specifies some input value for the task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the property has changed. When used on a java.io.File object that refers to a file or directory, the up-to-date check is only dependent on the path and not the contents of the file or directory. To make it depend on the contents, use org.gradle.api.tasks.InputFile or org.gradle.api.tasks.InputDirectory respectively.

org.gradle.api.tasks.InputDirectory

Marks a property as specifying an input directory for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the directory location or contents have changed. To make the task dependent on the directory location but not the contents, use an org.gradle.api.tasks.Input annotation instead.

org.gradle.api.tasks.InputFile

Marks a property as specifying an input file for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the file path or contents have changed. To make the up-to-date check only dependent on the path and not the contents of the file or directory, annotate it instead with org.gradle.api.tasks.Input.

org.gradle.api.tasks.incremental.InputFileDetails

A change to an input file.

org.gradle.api.tasks.InputFiles

Marks a property as specifying the input files for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the file paths or contents have changed. Also see org.gradle.api.tasks.InputDirectory.

org.gradle.normalization.InputNormalization

Input normalization configuration. Input normalization is used when Gradle tries to determine if two task inputs are different. Gradle normalizes both inputs and the inputs are considered different if and only if the normalizations are different.

org.gradle.normalization.InputNormalizationHandler

Used to configure input normalization. Currently, it is only possible to configure runtime classpath normalization.

org.gradle.nativeplatform.tasks.InstallExecutable

Installs an executable with it's dependent libraries so it can be easily executed.

org.gradle.nativeplatform.test.xctest.tasks.InstallXCTestBundle

Creates a XCTest bundle with a run script so it can be easily executed.

org.gradle.tooling.model.java.InstalledJdk

Represents a Java Development Kit machine installation.

org.gradle.tooling.IntermediateResultHandler

A handler for an intermediate result obtained by a BuildActionExecuter.

org.gradle.api.tasks.Internal

Attached to a task property to indicate that the property is not to be taken into account for up-to-date checking.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task not to be considered out-of-date when the property has changed.

org.gradle.api.InvalidActionClosureException

Thrown when a Closure is given as an Action implementation, but has the wrong signature.

org.gradle.api.publish.ivy.InvalidIvyPublicationException

Thrown when attempting to publish with an invalid IvyPublication.

org.gradle.api.publish.maven.InvalidMavenPublicationException

Thrown when attempting to publish with an invalid MavenPublication.

org.gradle.platform.base.InvalidModelException

Thrown when a component model is declared in an invalid way.

org.gradle.model.InvalidModelRuleDeclarationException

Thrown when a model rule, or source of model rules, is declared in an invalid way.

org.gradle.model.InvalidModelRuleException

Thrown when there is a problem with the usage of a model rule.

This exception is different to InvalidModelRuleDeclarationException in that it signifies a problem with using a model rule in a particular context, whereas InvalidModelRuleDeclarationException signifies a problem with the declaration of the model rule itself (which therefore means that the rule could not be used in any context).

This exception should always have cause, that provides information about the actual problem.

org.gradle.api.plugins.InvalidPluginException

Thrown when a plugin is found to be invalid when it is loaded.

org.gradle.testkit.runner.InvalidPluginMetadataException

Thrown when the plugin under test metadata cannot be read.

org.gradle.testkit.runner.InvalidRunnerConfigurationException

Thrown when a build cannot be executed due to the runner being in an invalid state.

org.gradle.api.InvalidUserCodeException

A InvalidUserCodeException is thrown when user-provided code cannot be executed.

org.gradle.api.InvalidUserDataException

A InvalidUserDataException is thrown, if a user is providing illegal data for the build.

org.gradle.workers.IsolationMode

Isolation mode for workers.

org.gradle.api.publish.ivy.IvyArtifact

An artifact published as part of a IvyPublication.

org.gradle.api.artifacts.repositories.IvyArtifactRepository

An artifact repository which uses an Ivy format to store artifacts and meta-data.

When used to resolve metadata and artifact files, all available patterns will be searched.

When used to upload metadata and artifact files, only a single, primary pattern will be used:

  1. If a URL is specified via #setUrl(Object) then that URL will be used for upload, combined with the applied #layout(String).
  2. If no URL has been specified but additional patterns have been added via #artifactPattern or #ivyPattern, then the first defined pattern will be used.

Repositories of this type are created by the org.gradle.api.artifacts.dsl.RepositoryHandler#ivy(org.gradle.api.Action) group of methods.

org.gradle.api.artifacts.repositories.IvyArtifactRepositoryMetaDataProvider

The meta-data provider for an Ivy repository. Uses the Ivy module descriptor (ivy.xml) to determine the meta-data for module versions and artifacts.

org.gradle.api.publish.ivy.IvyArtifactSet

A Collection of IvyArtifacts to be included in an IvyPublication. Being a DomainObjectSet, a IvyArtifactSet provides convenient methods for querying, filtering, and applying actions to the set of IvyArtifacts.

 apply plugin: 'ivy-publish' def publication = publishing.publications.create("my-pub", IvyPublication) def artifacts = publication.artifacts artifacts.matching({ it.type == "source" }).all({ it.extension = "src.jar" }) 

org.gradle.api.publish.ivy.IvyConfiguration

A configuration included in an IvyPublication, which will be published in the ivy descriptor file generated.

org.gradle.api.publish.ivy.IvyConfigurationContainer

The set of IvyConfigurations that will be included in the IvyPublication. Being a org.gradle.api.NamedDomainObjectContainer, a IvyConfigurationContainer provides convenient methods for adding, querying, filtering, and applying actions to the set of IvyConfigurations.

 apply plugin: 'ivy-publish' def publication = publishing.publications.create("my-pub", IvyPublication) def configurations = publication.configurations configurations.create("extended", { extend "default"}) configurations.all { extend "base" } 

org.gradle.api.publish.ivy.IvyDependency

A module dependency declared in an ivy dependency descriptor published as part of an IvyPublication.

org.gradle.ivy.IvyDescriptorArtifact

An Ivy descriptor artifact.

org.gradle.api.artifacts.ivy.IvyExtraInfo

Represents the set of "extra" info elements in the Ivy descriptor. These elements are children of the "ivy" element, but are not defined in the Ivy schema and come from other namespaces.

org.gradle.api.publish.ivy.IvyExtraInfoSpec

Represents a modifiable form of IvyExtraInfo so that "extra" info elements can be configured on an Ivy publication.

org.gradle.ivy.IvyModule

An Ivy Module component.

org.gradle.api.artifacts.ivy.IvyModuleDescriptor

The metadata about an Ivy module that acts as an input to a component metadata rule.

org.gradle.api.publish.ivy.IvyModuleDescriptorAuthor

An author of an Ivy publication.

org.gradle.api.publish.ivy.IvyModuleDescriptorDescription

The description of an Ivy publication.

org.gradle.api.publish.ivy.IvyModuleDescriptorLicense

A license of an Ivy publication.

org.gradle.api.publish.ivy.IvyModuleDescriptorSpec

The descriptor of any Ivy publication.

Corresponds to the XML version of the Ivy Module Descriptor.

The #withXml(org.gradle.api.Action) method can be used to modify the descriptor after it has been generated according to the publication data. However, the preferred way to customize the project information to be published is to use the dedicated configuration methods exposed by this class, e.g. #description(Action).

org.gradle.api.artifacts.repositories.IvyPatternRepositoryLayout

A repository layout that uses user-supplied patterns. Each pattern will be appended to the base URI for the repository. At least one artifact pattern must be specified. If no Ivy patterns are specified, then the artifact patterns will be used. Optionally supports a Maven style layout for the 'organisation' part, replacing any dots with forward slashes. For examples see the reference for org.gradle.api.artifacts.repositories.IvyArtifactRepository#layout(String, org.gradle.api.Action).

org.gradle.api.publish.ivy.IvyPublication

A IvyPublication is the representation/configuration of how Gradle should publish something in Ivy format, to an Ivy repository. You directly add a named Ivy Publication the project's publishing.publications container by providing IvyPublication as the type.

 publishing { publications { myPublicationName(IvyPublication) { // Configure the publication here } } } 

The Ivy module identifying attributes of the publication are mapped as follows:

  • module - project.name
  • organisation - project.group
  • revision - project.version
  • status - project.status

For certain common use cases, it's often sufficient to specify the component to publish, using (#from(org.gradle.api.component.SoftwareComponent). The published component is used to determine which artifacts to publish, and which configurations and dependencies should be listed in the generated ivy descriptor file.

You can add configurations to the generated ivy descriptor file, by supplying a Closure to the #configurations(org.gradle.api.Action) method.

To add additional artifacts to the set published, use the #artifact(Object) and #artifact(Object, org.gradle.api.Action) methods. You can also completely replace the set of published artifacts using #setArtifacts(Iterable). Together, these methods give you full control over the artifacts to be published.

In addition, IvyModuleDescriptorSpec provides configuration methods to customize licenses, authors, and the description to be published in the Ivy module descriptor.

For any other tweaks to the publication, it is possible to modify the generated Ivy descriptor file prior to publication. This is done using the IvyModuleDescriptorSpec#withXml(org.gradle.api.Action) method, normally via a Closure passed to the #descriptor(org.gradle.api.Action) method.

Example of publishing a java component with an added source jar and custom module description
 apply plugin: "java" apply plugin: "ivy-publish" task sourceJar(type: Jar) { from sourceSets.main.allJava } publishing { publications { myPublication(IvyPublication) { from components.java artifact(sourceJar) { type "source" extension "src.jar" conf "runtime" } descriptor { license { name = "Custom License" } author { name = "Custom Name" } description { text = "Custom Description" } } } } } 

org.gradle.api.publish.ivy.plugins.IvyPublishPlugin

Adds the ability to publish in the Ivy format to Ivy repositories.

org.gradle.api.plugins.quality.JDepend

Analyzes code with JDepend.

org.gradle.api.plugins.quality.JDependExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.quality.JDependExtension

Configuration options for the JDepend plugin.

org.gradle.api.plugins.quality.JDependPlugin

A org.gradle.api.Plugin that generates design quality metrics by scanning your source packages. This is done using the JDepend tool. This plugin will automatically generate a task for each Java source set. See JDepend for more information.

org.gradle.api.plugins.quality.JDependReports

The reporting configuration for the JDepend task. Exactly one of the XML or HTML reports can be enabled when the task executes. If more than one or none is enabled, an org.gradle.api.InvalidUserDataException will be thrown.

org.gradle.api.tasks.testing.junit.JUnitOptions

The JUnit specific test options.

org.gradle.api.tasks.testing.junitplatform.JUnitPlatformOptions

The JUnit platform specific test options.

org.gradle.jvm.test.JUnitTestSuiteBinarySpec

Represents a JUnit test suite binary.

org.gradle.jvm.plugins.JUnitTestSuitePlugin

This plugin adds support for execution of JUnit test suites to the Java software model.

org.gradle.jvm.test.JUnitTestSuiteSpec

Represents a JUnit test suite.

org.gradle.api.tasks.testing.JUnitXmlReport

The JUnit XML files, commonly used to communicate results to CI servers.

org.gradle.testing.jacoco.tasks.JacocoBase

Base class for Jacoco tasks.

org.gradle.testing.jacoco.tasks.JacocoCoverageVerification

Task for verifying code coverage metrics. Fails the task if violations are detected based on specified rules.

Requires JaCoCo version >= 0.6.3.

org.gradle.testing.jacoco.tasks.rules.JacocoLimit

Defines a Jacoco rule limit.

org.gradle.testing.jacoco.tasks.JacocoMerge

Task to merge multiple execution data files into one.

org.gradle.testing.jacoco.plugins.JacocoPlugin

Plugin that provides support for generating Jacoco coverage data.

org.gradle.testing.jacoco.plugins.JacocoPluginExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.testing.jacoco.plugins.JacocoPluginExtension

Extension including common properties and methods for Jacoco.

org.gradle.testing.jacoco.tasks.JacocoReport

Task to generate HTML, Xml and CSV reports of Jacoco coverage data.

org.gradle.testing.jacoco.tasks.JacocoReportBase

Base class for Jacoco report tasks.

org.gradle.testing.jacoco.tasks.JacocoReportsContainer

The reporting configuration for the JacocoReport task.

org.gradle.testing.jacoco.plugins.JacocoTaskExtension

Extension for tasks that should run with a Jacoco agent to generate coverage execution data.

org.gradle.testing.jacoco.tasks.rules.JacocoViolationRule

Defines a Jacoco violation rule.

org.gradle.testing.jacoco.tasks.rules.JacocoViolationRulesContainer

The violation rules configuration for the org.gradle.testing.jacoco.tasks.JacocoReport task.

org.gradle.jvm.tasks.Jar

Assembles a JAR archive.

org.gradle.api.tasks.bundling.Jar

Assembles a JAR archive.

org.gradle.jvm.JarBinarySpec

Definition of a Jar file binary that is to be built by Gradle.

org.gradle.plugins.ide.idea.model.JarDirectory

Represents a jar directory element of an idea module library.

org.gradle.jvm.application.scripts.JavaAppStartScriptGenerationDetails

Details for generating Java-based application start scripts.

org.gradle.api.plugins.JavaBasePlugin

A org.gradle.api.Plugin which compiles and tests Java source, and assembles it into a JAR file.

org.gradle.api.tasks.compile.JavaCompile

Compiles Java source files.

 apply plugin: 'java' tasks.withType(JavaCompile) { //enable compilation in a separate daemon process options.fork = true //enable incremental compilation options.incremental = true } 

org.gradle.tooling.model.build.JavaEnvironment

Informs about the Java environment, for example the Java home or the JVM args used. See example in BuildEnvironment.

org.gradle.api.tasks.JavaExec

Executes a Java application in a child process.

Similar to org.gradle.api.tasks.Exec, but starts a JVM with the given classpath and application class.

 apply plugin: 'java' task runApp(type: JavaExec) { classpath = sourceSets.main.runtimeClasspath main = 'package.Main' // arguments to pass to the application args 'appArg1' } 

The process can be started in debug mode (see #getDebug()) in an ad-hoc manner by supplying the `--debug-jvm` switch when invoking the build.

 gradle someJavaExecTask --debug-jvm 

org.gradle.process.JavaExecSpec

Specifies the options for executing a Java application.

org.gradle.process.JavaForkOptions

Specifies the options to use to fork a Java process.

org.gradle.plugin.devel.plugins.JavaGradlePluginPlugin

A plugin for building java gradle plugins. Automatically generates plugin descriptors. Emits warnings for common error conditions.

Provides a direct integration with TestKit by declaring the gradleTestKit() dependency for the test compile configuration and a dependency on the plugin classpath manifest generation task for the test runtime configuration. Default conventions can be customized with the help of GradlePluginDevelopmentExtension. Integrates with the 'maven-publish' and 'ivy-publish' plugins to automatically publish the plugins so they can be resolved using the `pluginRepositories` and `plugins` DSL.

org.gradle.language.java.plugins.JavaLanguagePlugin

Plugin for compiling Java code. Applies the org.gradle.language.base.plugins.ComponentModelBasePlugin and org.gradle.language.jvm.plugins.JvmResourcesPlugin. Registers "java" language support with the JavaSourceSet.

org.gradle.api.plugins.JavaLibraryDistributionPlugin

A Plugin which package a Java project as a distribution including the JAR and runtime dependencies.

org.gradle.api.plugins.JavaLibraryPlugin

A Plugin which extends the capabilities of the JavaPlugin by cleanly separating the API and implementation dependencies of a library.

org.gradle.jvm.platform.JavaPlatform

Defines and configures a Java SE runtime environment, consisting of a JVM runtime and a set of class libraries.

 plugins { id "jvm-component" id "java-lang" } model { components { myLib(JvmLibrarySpec) { targetPlatform "java6" } } } 

org.gradle.api.plugins.JavaPlugin

A Plugin which compiles and tests Java source, and assembles it into a JAR file.

org.gradle.api.plugins.JavaPluginConvention

Is mixed into the project when applying the org.gradle.api.plugins.JavaBasePlugin or the org.gradle.api.plugins.JavaPlugin.

org.gradle.tooling.model.java.JavaRuntime

Represents a Java virtual machine installation.

org.gradle.plugins.javascript.base.JavaScriptBasePlugin
org.gradle.plugins.javascript.base.JavaScriptExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.javascript.base.JavaScriptExtension
org.gradle.play.tasks.JavaScriptMinify

Task to minify JavaScript assets.

org.gradle.plugins.javascript.base.JavaScriptRepositoriesExtension
org.gradle.language.javascript.JavaScriptSourceSet

Represents a source set containing javascript sources.

org.gradle.language.java.JavaSourceSet

A set of sources passed to the Java compiler.

org.gradle.jvm.toolchain.JavaToolChain

A set of tools for building from Java source.

A JavaToolChain is able to:

  • Compile Java source to bytecode.
  • Generate Javadoc from Java source.

org.gradle.jvm.toolchain.JavaToolChainRegistry

A container for JavaToolChains.

org.gradle.api.JavaVersion

An enumeration of Java versions. Before 9: http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html 9+: http://openjdk.java.net/jeps/223

org.gradle.api.tasks.javadoc.Javadoc

Generates HTML API documentation for Java classes.

If you create your own Javadoc tasks remember to specify the 'source' property! Without source the Javadoc task will not create any documentation. Example:

 apply plugin: 'java' task myJavadocs(type: Javadoc) { source = sourceSets.main.allJava } 

An example how to create a task that runs a custom doclet implementation:

 apply plugin: 'java' configurations { jaxDoclet } dependencies { //jaxDoclet "some.interesting:Dependency:1.0" } task generateRestApiDocs(type: Javadoc) { source = sourceSets.main.allJava destinationDir = reporting.file("rest-api-docs") options.docletpath = configurations.jaxDoclet.files.asType(List) options.doclet = "com.lunatech.doclets.jax.jaxrs.JAXRSDoclet" options.addStringOption("jaxrscontext", "http://localhost:8080/myapp") } 

org.gradle.language.java.artifact.JavadocArtifact

An artifact containing Javadoc documentation.

org.gradle.external.javadoc.JavadocMemberLevel

This enum maps to the -public, -protected, -package and -private options of the javadoc executable.

org.gradle.external.javadoc.JavadocOfflineLink

This class is used to hold the information that can be provided to the javadoc executable via the -linkoffline option.

org.gradle.external.javadoc.JavadocOptionFileOption

Represents a Javadoc command-line option.

org.gradle.external.javadoc.JavadocOutputLevel

This enum maps to the -verbose and -quiet options of the javadoc executable.

org.gradle.plugins.ide.idea.model.Jdk

Represents information for the project Java SDK. This translates to attributes of the ProjectRootManager element in the ipr.

org.gradle.plugins.ide.eclipse.model.Jdt

Represents the Eclipse JDT settings.

org.gradle.plugins.javascript.jshint.JsHint
org.gradle.plugins.javascript.jshint.JsHintExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.javascript.jshint.JsHintExtension
org.gradle.plugins.javascript.jshint.JsHintPlugin
org.gradle.jvm.JvmApiSpec

Specifies the packages that constitute the API of a library. Facilitates separation of API and implementation binaries for that library. Backing object for the api {} DSL.

org.gradle.jvm.JvmBinarySpec

Represents a binary artifact that is the result of building a jvm component.

org.gradle.jvm.JvmByteCode

LanguageOutputType marking Jvm byte code.

org.gradle.play.JvmClasses

A set of classes and resources that operate together.

org.gradle.jvm.plugins.JvmComponentPlugin

Base plugin for JVM component support. Applies the org.gradle.language.base.plugins.ComponentModelBasePlugin. Registers the JvmLibrarySpec library type for the components container.

org.gradle.jvm.JvmComponentSpec

Definition of a software component that is to be built by Gradle to run a on JVM platform.

org.gradle.jvm.JvmLibrary

A Library component that runs on the Java Virtual Machine.

org.gradle.jvm.JvmLibrarySpec

Definition of a JVM library component that is to be built by Gradle.

org.gradle.language.jvm.JvmResourceSet

A set of resource files.

org.gradle.jvm.JvmResources

LanguageOutputType marking Jvm Resource Output

org.gradle.language.jvm.plugins.JvmResourcesPlugin

Plugin for packaging JVM resources. Applies the org.gradle.language.base.plugins.ComponentModelBasePlugin. Registers "resources" language support with the .

org.gradle.tooling.events.test.JvmTestKind

Enumerates the different kinds of JVM tests. This allows to differentiate between test suites, atomic tests, etc.

org.gradle.tooling.events.test.JvmTestOperationDescriptor

Describes a test that runs on the JVM and for which an event has occurred. At least a suite name, class name, or method name is available for each JVM test.

org.gradle.jvm.plugins.JvmTestSuiteBasePlugin

The base plugin that needs to be applied by all plugins which provide testing support for the Java software model.

org.gradle.jvm.test.JvmTestSuiteBinarySpec

Base type of JVM test suite binaries.

org.gradle.jvm.test.JvmTestSuiteSpec

Base type for all JVM test suites.

org.gradle.kotlin.dsl.KotlinBuildScript

Base class for Kotlin build scripts.

org.gradle.kotlin.dsl.tooling.models.KotlinBuildScriptModel
org.gradle.kotlin.dsl.tooling.models.KotlinBuildScriptTemplateModel

Kotlin build script template model.

org.gradle.kotlin.dsl.KotlinClosure0

Adapts a parameterless Kotlin function to a parameterless Groovy Closure.

org.gradle.kotlin.dsl.KotlinClosure1

Adapts an unary Kotlin function to an unary Groovy Closure.

org.gradle.kotlin.dsl.KotlinClosure2

Adapts a binary Kotlin function to a binary Groovy Closure.

org.gradle.kotlin.dsl.plugins.dsl.KotlinDslCompilerPlugins

Configures the Kotlin compiler to recognise Gradle functional interface annotated with HasImplicitReceiver.

org.gradle.kotlin.dsl.plugins.dsl.KotlinDslPlugin

The kotlin-dsl plugin.

org.gradle.kotlin.dsl.KotlinInitScript

Base class for Kotlin init scripts.

org.gradle.kotlin.dsl.KotlinScriptTemplate

Temporary workaround for Kotlin 1.2.50.

org.gradle.kotlin.dsl.KotlinSettingsScript

Base class for Kotlin settings scripts.

org.gradle.language.base.plugins.LanguageBasePlugin

Base plugin for language support. - Adds a ProjectSourceSet named sources to the project. - Registers the base LanguageSourceSet type.

org.gradle.language.base.LanguageSourceSet

A set of sources for a programming language.

org.gradle.tooling.model.Launchable

Represents an object that can be used to launch a Gradle build, such as a task.

To launch a build, you pass one or more org.gradle.tooling.model.Launchable instances to either org.gradle.tooling.BuildLauncher#forTasks(Iterable) or org.gradle.tooling.BuildLauncher#forLaunchables(Iterable).

org.gradle.api.artifacts.LenientConfiguration

Resolved configuration that does not fail eagerly when some dependencies are not resolved, or some artifacts do not exist.

org.gradle.plugins.ide.eclipse.model.Library

A classpath entry representing a library.

org.gradle.platform.base.Library

A library that can be linked into or depended on by another software element.

org.gradle.platform.base.LibraryBinaryDependencySpec

A dependency onto a specific binary of a library published by a project.

org.gradle.api.artifacts.component.LibraryBinaryIdentifier

An identifier for a library instance that is built as part of the current build.

org.gradle.platform.base.LibraryBinarySpec

A binary produced from a `org.gradle.platform.base.LibrarySpec`.

org.gradle.api.artifacts.component.LibraryComponentSelector

Criteria for selecting a library instance that is built as part of the current build.

org.gradle.language.LibraryDependencies

Allows the API and implementation dependencies of a library to be specified.

org.gradle.platform.base.LibrarySpec

A specification of a org.gradle.platform.base.Library.

org.gradle.language.base.plugins.LifecycleBasePlugin

A org.gradle.api.Plugin which defines a basic project lifecycle.

org.gradle.plugins.ide.eclipse.model.Link

Link.

org.gradle.nativeplatform.tasks.LinkExecutable

Links a binary executable from object files and libraries.

org.gradle.nativeplatform.tasks.LinkMachOBundle

Links a binary bundle from object files and imported libraries.

org.gradle.nativeplatform.tasks.LinkSharedLibrary

Links a binary shared library from object files and imported libraries.

org.gradle.nativeplatform.Linkage

Specify how a native library should be linked into another binary.

org.gradle.api.provider.ListProperty

Represents a property whose type is a List of elements of type T.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory method org.gradle.api.model.ObjectFactory#listProperty(Class).

org.gradle.tooling.ListenerFailedException

Thrown whenever a listener fails with an exception, which in general implies that the build completed like it should, but that one of the listeners failed with an exception.

org.gradle.jvm.toolchain.LocalJava

A local JDK, JRE or Java 9+ installation.

org.gradle.api.tasks.LocalState

Marks a property as specifying local state for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

Local state is removed when the task is loaded from cache.

org.gradle.api.logging.LogLevel

The log levels supported by Gradle.

org.gradle.api.logging.Logger

An extension to the SLF4J Logger interface, which adds the quiet and lifecycle log levels.

You can obtain a Logger instance using Logging#getLogger(Class) or . A Logger instance is also available through , org.gradle.api.Task#getLogger() and .

org.gradle.api.logging.Logging

The main entry point for Gradle's logging system. Gradle routes all logging via SLF4J. You can use either an SLF4J org.slf4j.Logger or a Gradle Logger to perform logging.

org.gradle.api.logging.configuration.LoggingConfiguration

A LoggingConfiguration defines the logging settings for a Gradle build.

org.gradle.api.logging.LoggingManager

A LoggingManager provides access to and control over the Gradle logging system. Using this interface, you can control standard output and error capture and receive logging events.

org.gradle.api.logging.LoggingOutput

Provides access to the output of the Gradle logging system.

org.gradle.tooling.LongRunningOperation

Offers ways to communicate both ways with a Gradle operation, be it building a model or running tasks.

Enables tracking progress via listeners that will receive events from the Gradle operation.

Allows providing standard output streams that will receive output if the Gradle operation writes to standard streams.

Allows providing standard input that can be consumed by the gradle operation (useful for interactive builds).

Enables configuring the build run / model request with options like the Java home or JVM arguments. Those settings might not be supported by the target Gradle version. Refer to Javadoc for those methods to understand what kind of exception throw and when is it thrown.

org.gradle.model.Managed

A managed type is transparent to the model space, and enforces immutability at the appropriate times in the object's lifecycle.

Gradle generates implementations for managed types. As such, managed types are declared either as interfaces or abstract classes. The generated implementation integrates with the model space mechanisms, and manages mutability.

Managed types are mostly behaviour-less, as they are data. Instances of managed types should effectively be considered value objects.

Properties

Managed types declare their structure as properties, via getter and setter methods. Getter and setter methods are expected to conform to the well-known Java Bean naming conventions. A read/write “name” property would be expressed via the following methods:

 void setName(String name); String getName(); 

A getter and setter must be declared for each property that is not of a managed type or of ModelSet. For properties of managed types or of ModelSet the getter is mandatory and the setter is optional. If no setter is provided the property is considered inherent and defaults to an "empty" instance of the type. In addition to the traditional getter method, properties of type boolean (but not Boolean) also support a getter method which name starts with is, for example:

 void setEnabled(boolean enabled); boolean isEnabed(); 
Supported property types

The following JDK types are allowed:

  • String
  • Boolean
  • Character
  • Byte
  • Short
  • Integer
  • Long
  • Float
  • Double
  • java.math.BigInteger
  • java.math.BigDecimal
  • java.io.File

All primitive types and Enum types are also allowed.

Properties that are themselves of a managed type are also supported.

Currently, the only collection types that are supported are ModelSet and ModelMap, as well as java.util.Set or java.util.List of org.gradle.model.internal.manage.schema.extract.ScalarTypes, where scalar types is either one of the supported immutable JDK types above or an enumeration.

Properties of any other type must have their getter annotated with Unmanaged. An unmanaged property is not transparent to the model infrastructure and is guaranteed to be immutable when realized.

Named types

Managed types may implement/extend the org.gradle.api.Named interface. Any managed type implementing this interface will have its name attribute populated automatically based on the name of the corresponding node in the model graph.

The ModelMap type requires that its elements are org.gradle.api.Named.

Inheritance

Managed types can be arranged into an inheritance hierarchy. Every type in the hierarchy must conform to the constraints of managed types.

Calculated read-only properties

Managed types can contain getter methods that return calculated values, based on other properties. For example, a “name” property may return the concatenation of a “firstName” and “lastName” property. When using Java 8 or later, such properties can be implemented as interface default methods. Alternatively, the managed type can be implemented as an abstract class with the calculated property implemented as a non-abstract getter method. In both cases, the implementation of the calculated property getter may not call any setter method.

Abstract classes

A managed type can be implemented as an abstract class. All property getters and setters must be declared abstract (with the exception of calculated read-only properties). The class cannot contain instance variables, constructors, or any methods that are not a getter or setter.

Creating managed model elements

Please see Model for information on creating model elements of managed types.

org.gradle.api.java.archives.Manifest

Represents the manifest file of a JAR file.

org.gradle.api.java.archives.ManifestException

Is thrown in the case an operation is applied against a org.gradle.api.java.archives.Manifest that violates the Manifest specification.

org.gradle.api.java.archives.ManifestMergeDetails

Details of a value being merged from two different manifests.

org.gradle.api.java.archives.ManifestMergeSpec

Specifies how the entries of multiple manifests should be merged together.

org.gradle.caching.MapBasedBuildCacheService

Simple build cache implementation that delegates to a ConcurrentMap.

org.gradle.api.publish.maven.MavenArtifact

An artifact published as part of a MavenPublication.

org.gradle.api.artifacts.repositories.MavenArtifactRepository

An artifact repository which uses a Maven format to store artifacts and meta-data.

Repositories of this type are created by the org.gradle.api.artifacts.dsl.RepositoryHandler#maven(org.gradle.api.Action) group of methods.

org.gradle.api.publish.maven.MavenArtifactSet

A Collection of MavenArtifacts to be included in a MavenPublication. Being a DomainObjectSet, a MavenArtifactSet provides convenient methods for querying, filtering, and applying actions to the set of MavenArtifacts.

 apply plugin: 'maven-publish' def publication = publishing.publications.create("name", MavenPublication) def artifacts = publication.artifacts artifacts.matching({ it.classifier == "classy" }).all({ it.extension = "ext" }) 

org.gradle.api.publish.maven.MavenDependency

A dependency declared as part of an MavenPublication.

org.gradle.api.artifacts.maven.MavenDeployer

A resolver that can only be used for uploading artifacts to a Maven repository. If you use this resolver for getting dependencies from a Maven repository, an exception is thrown. This resolver support all aspects of Maven deployment, including snapshot deployment and metadata.xml manipulation.

You have to specify at least one repository. Otherwise, if there is only one artifact, usually there is not more to do. If there is more than one artifact you have to decide what to do about this, as a Maven POM can only deal with one artifact. There are two strategies. If you want to deploy only one artifact you have to specify a filter to select this artifact. If you want to deploy more than one artifact, you have to specify filters which select each artifact. Associated with each filter is a separate configurable POM.

You can create an instance of this type via the org.gradle.api.tasks.Upload#getRepositories() container

org.gradle.api.artifacts.maven.MavenDeployment

Represents the artifacts which will be deployed to a Maven repository. You can use this interface to modify the set of artifacts.

org.gradle.maven.MavenModule

A Maven Module component.

org.gradle.api.plugins.MavenPlugin

A org.gradle.api.Plugin which allows project artifacts to be deployed to a Maven repository, or installed to the local Maven cache.

org.gradle.api.plugins.MavenPluginConvention

Properties and methods added by the org.gradle.api.plugins.MavenPlugin.

org.gradle.api.artifacts.maven.MavenPom

Is used for generating a Maven POM file and customizing the generation. To learn about the Maven POM see: http://maven.apache.org/pom.html

org.gradle.api.publish.maven.MavenPom

The POM for a Maven publication.

The #withXml(org.gradle.api.Action) method can be used to modify the descriptor after it has been generated according to the publication data. However, the preferred way to customize the project information to be published is to use the dedicated properties exposed by this class, e.g. #getDescription(). Please refer to the official POM Reference for detailed information about the individual properties.

org.gradle.maven.MavenPomArtifact

A Maven POM artifact.

org.gradle.api.publish.maven.MavenPomCiManagement

The CI management system of a Maven publication.

org.gradle.api.publish.maven.MavenPomContributor

A contributor of a Maven publication.

org.gradle.api.publish.maven.MavenPomContributorSpec

Allows to add contributors of a Maven publication.

org.gradle.api.publish.maven.MavenPomDeveloper

A developer of a Maven publication.

org.gradle.api.publish.maven.MavenPomDeveloperSpec

Allows to add developers to a Maven publication.

org.gradle.api.publish.maven.MavenPomDistributionManagement

The distribution management configuration of a Maven publication.

org.gradle.api.publish.maven.MavenPomIssueManagement

The issue management system of a Maven publication.

org.gradle.api.publish.maven.MavenPomLicense

A license of a Maven publication.

org.gradle.api.publish.maven.MavenPomLicenseSpec

Allows to add licenses to a Maven publication.

org.gradle.api.publish.maven.MavenPomMailingList

A mailing list of a Maven publication.

org.gradle.api.publish.maven.MavenPomMailingListSpec

Allows to add mailing lists to a Maven publication.

org.gradle.api.publish.maven.MavenPomOrganization

The organization of a Maven publication.

org.gradle.api.publish.maven.MavenPomRelocation

The relocation information of a Maven publication that has been moved to a new group and/or artifact ID.

org.gradle.api.publish.maven.MavenPomScm

The SCM (source control management) of a Maven publication.

org.gradle.api.publish.maven.MavenPublication

A MavenPublication is the representation/configuration of how Gradle should publish something in Maven format. You directly add a named Maven Publication the project's publishing.publications container by providing MavenPublication as the type.

 publishing { publications { myPublicationName(MavenPublication) { // Configure the publication here } } } 
The default Maven POM identifying attributes are mapped as follows:
  • groupId - project.group
  • artifactId - project.name
  • version - project.version

For certain common use cases, it's often sufficient to specify the component to publish, and nothing more (#from(org.gradle.api.component.SoftwareComponent). The published component is used to determine which artifacts to publish, and which dependencies should be listed in the generated POM file.

To add additional artifacts to the set published, use the #artifact(Object) and #artifact(Object, org.gradle.api.Action) methods. You can also completely replace the set of published artifacts using #setArtifacts(Iterable). Together, these methods give you full control over what artifacts will be published.

To customize the metadata published in the generated POM, set properties, e.g. MavenPom#getDescription(), on the POM returned via the #getPom() method or directly by an action (or closure) passed into #pom(org.gradle.api.Action). As a last resort, it is possible to modify the generated POM using the MavenPom#withXml(org.gradle.api.Action) method.

Example of publishing a Java module with a source artifact and a customized POM
 apply plugin: "java" apply plugin: "maven-publish" task sourceJar(type: Jar) { from sourceSets.main.allJava classifier "sources" } publishing { publications { myPublication(MavenPublication) { from components.java artifact sourceJar pom { name = "Demo" description = "A demonstration of Maven POM customization" url = "http://www.example.com/project" licenses { license { name = "The Apache License, Version 2.0" url = "http://www.apache.org/licenses/LICENSE-2.0.txt" } } developers { developer { id = "johnd" name = "John Doe" email = "john.doe@example.com" } } scm { connection = "scm:svn:http://subversion.example.com/svn/project/trunk/" developerConnection = "scm:svn:https://subversion.example.com/svn/project/trunk/" url = "http://subversion.example.com/svn/project/trunk/" } } } } } 

org.gradle.api.publish.maven.plugins.MavenPublishPlugin

Adds the ability to publish in the Maven format to Maven repositories.

org.gradle.api.plugins.MavenRepositoryHandlerConvention

Allows Maven repositories for publishing artifacts to be defined. The Maven plugin mixes-in this interface to the org.gradle.api.artifacts.dsl.RepositoryHandler associated with each task of type org.gradle.api.tasks.Upload.

org.gradle.api.artifacts.maven.MavenResolver

An ArtifactRepository which can be used to publish artifacts to Maven repositories.

org.gradle.api.artifacts.repositories.MetadataSupplierAware

Interface for repositories which support custom metadata suppliers and/or version listers. A custom version lister or metadata supplier can be used as an optimization technique to avoid too many requests on a server. By providing such rules, a plugin or build author can provide the necessary information to perform component selection without having to actually fetch the component metadata on a server.

org.gradle.nativeplatform.toolchain.plugins.MicrosoftVisualCppCompilerPlugin

A Plugin which makes the Microsoft Visual C++ compiler available to compile C/C++ code.

org.gradle.external.javadoc.MinimalJavadocOptions

Provides the core Javadoc options.

org.gradle.api.resources.MissingResourceException

Exception thrown when the resource does not exist

org.gradle.tooling.model.Model

A model that is buildable by the Tooling API. Models contain various information regarding the build. Models are typically tailored to a specific domain, for example build environment or IDE.

org.gradle.model.Model

Denotes that the RuleSource method rule carrying this annotation creates a new top level element in the model space.

The method must advertise a name and type for the model element. The name is defined either by the name of the method, or the #value of this annotation. The type is defined differently depending on whether the new element is Managed or not.

Creating managed model elements

If the element is to be of a managed type, the method must return void and receive the newly created instance as the first parameter. All other parameters are considered inputs.

It is an error for a @Model rule to return void and specify a non-managed type as the first parameter. It is an error for a @Model rule to return void and for the first parameter to be annotated with Path. It is an error for a @Model rule to specify a managed type as the return type.

Creating non-managed model elements

If the element is to be of a non-managed type, the method must return the newly created instance. All parameters are considered inputs. Please see RuleSource for more information on method rules.

org.gradle.tooling.ModelBuilder

A ModelBuilder allows you to fetch a snapshot of some model for a project or a build. Instances of ModelBuilder are not thread-safe.

You use a ModelBuilder as follows:

Example:
 ProjectConnection connection = GradleConnector.newConnector() .forProjectDirectory(new File("someFolder")) .connect(); try { ModelBuilder<GradleProject> builder = connection.model(GradleProject.class); //if you use a different than usual build file name: builder.withArguments("--build-file", "theBuild.gradle"); //configure the standard input in case your build is interactive: builder.setStandardInput(new ByteArrayInputStream("consume this!".getBytes())); //if you want to listen to the progress events: ProgressListener listener = null; // use your implementation builder.addProgressListener(listener); //get the model: GradleProject project = builder.get(); //query the model for information: System.out.println("Available tasks: " + project.getTasks()); } finally { connection.close(); } 

org.gradle.model.ModelElement

Represents an element in a model. Elements are arranged in a hierarchy.

org.gradle.platform.base.ModelInstantiationException

Thrown when a model element cannot be instantiated for some reason.

org.gradle.model.ModelMap

Model backed map like structure allowing adding of items where instantiation is managed.

org.gradle.model.Managed types may declare model map properties. Model maps can only contain managed types.

org.gradle.api.reporting.model.ModelReport

Displays some details about the configuration model of the project. An instance of this type is used when you execute the model task from the command-line.

org.gradle.model.ModelRuleBindingException

Thrown when there is a problem binding the model element references of a model rule.

Should always be thrown as the cause of a org.gradle.model.InvalidModelRuleException.

org.gradle.model.ModelSet

A set of managed model objects.

org.gradle.model.Managed types may declare managed set properties. Managed sets can only contain managed types.

Managed set objects cannot be mutated via the mutative methods of the java.util.Set interface (e.g. java.util.Set#add(Object), java.util.Set#clear()). To add elements to the set, the #create(Action) method can be used.

org.gradle.model.ModelViewClosedException

Thrown when at attempt is made to mutate a subject of a rule after the rule has completed.

This can potentially happen when a reference to the subject is retained during a rule and then used afterwards, Such as when an anonymous inner class or closure “closes over” the subject.

org.gradle.plugins.ide.idea.model.Module

Represents the customizable elements of an iml (via XML hooks everything of the iml is customizable).

org.gradle.api.artifacts.component.ModuleComponentIdentifier

An identifier for a component instance which is available as a module version.

org.gradle.api.artifacts.component.ModuleComponentSelector

Criteria for selecting a component instance that is available as a module version.

org.gradle.plugins.ide.idea.model.ModuleDependency

Represents an orderEntry of type module in the iml XML.

org.gradle.api.artifacts.ModuleDependency

A ModuleDependency is a org.gradle.api.artifacts.Dependency on a module outside the current project.

For examples on configuring the exclude rules please refer to #exclude(java.util.Map).

org.gradle.platform.base.ModuleDependencySpec

A dependency onto a module.

org.gradle.platform.base.ModuleDependencySpecBuilder

A builder of a ModuleDependencySpec.

org.gradle.api.artifacts.ModuleIdentifier

The identifier of a module.

org.gradle.plugins.ide.idea.model.ModuleLibrary

Represents an orderEntry of type module-library in the iml XML.

org.gradle.api.artifacts.ModuleVersionIdentifier

The identifier of a module version.

org.gradle.api.artifacts.ModuleVersionSelector

Selects a module version. If you need to change this interface, you're probably doing it wrong: it is superceded by org.gradle.api.artifacts.component.ModuleComponentSelector, so check this first, and only add methods here if it's for bridging.

org.gradle.api.attributes.MultipleCandidatesDetails

Provides context about candidates for an attribute. In particular, this class gives access to the list of candidates on the producer side.

org.gradle.api.capabilities.MutableCapabilitiesMetadata

Describes the capabilities of a component in a mutable way. This interface can be used to adjust the capabilities of a published component via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

org.gradle.kotlin.dsl.MutablePropertyDelegate

Provides efficient access to a mutable dynamic property.

org.gradle.api.artifacts.MutableVersionConstraint

A configurable version constraint. This is exposed to the build author, so that one can express more constraints on a version,

org.gradle.model.Mutate

Denotes that the RuleSource method rule carrying this annotation mutates the rule subject.

Mutate rules execute after Defaults rules, but before Finalize rules. The first parameter of the rule is the rule subject, which is mutable for the duration of the rule.

Please see RuleSource for more information on method rules.

org.gradle.api.Named

Types can implement this interface and use the embedded Namer implementation, to satisfy API that calls for a namer.

org.gradle.api.NamedDomainObjectCollection (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.NamedDomainObjectCollection

A NamedDomainObjectCollection represents a collection of domain objects that have an inherent, constant, name.

Objects to be added to a named domain object collection must implement equals() in such a way that no two objects with different names are considered equal. That is, all equality tests must consider the name as an equality key. Behavior is undefined if two objects with different names are considered equal by their equals() implementation.

All implementations must guarantee that all elements in the collection are uniquely named. That is, an attempt to add an object with a name equal to the name of any existing object in the collection will fail. Implementations may choose to simply return false from add(T) or to throw an exception.

Objects in the collection are accessible as read-only properties, using the name of the object as the property name. For example (assuming the 'name' property provides the object name):

 books.add(new Book(name: "gradle", title: null)) books.gradle.title = "Gradle in Action" 

A dynamic method is added for each object which takes a configuration closure. This is equivalent to calling #getByName(String, groovy.lang.Closure). For example:

 books.add(new Book(name: "gradle", title: null)) books.gradle { title = "Gradle in Action" } 

You can also use the [] operator to access the objects of a collection by name. For example:

 books.add(new Book(name: "gradle", title: null)) books['gradle'].title = "Gradle in Action" 

Rule objects can be attached to the collection in order to respond to requests for objects by name where no object with name exists in the collection. This mechanism can be used to create objects on demand. For example:

 books.addRule('create any') { books.add(new Book(name: "gradle", title: null)) } books.gradle.name == "gradle" 

org.gradle.kotlin.dsl.NamedDomainObjectCollectionDelegateProvider
org.gradle.api.NamedDomainObjectContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.NamedDomainObjectContainer

A named domain object container is a specialisation of NamedDomainObjectSet that adds the ability to create instances of the element type.

Implementations may use different strategies for creating new object instances.

Note that a container is an implementation of java.util.SortedSet, which means that the container is guaranteed to only contain elements with unique names within this container. Furthermore, items are ordered by their name.

org.gradle.kotlin.dsl.NamedDomainObjectContainerDelegateProvider

A property delegate that creates elements in the given NamedDomainObjectContainer.

org.gradle.kotlin.dsl.NamedDomainObjectContainerScope

Receiver for NamedDomainObjectContainer configuration blocks.

org.gradle.api.NamedDomainObjectFactory

A factory for named objects of type T.

org.gradle.api.NamedDomainObjectList

A specialisation of org.gradle.api.NamedDomainObjectCollection that also implements java.util.List.

All object equality is determined in terms of object names. That is, calling remove() with an object that is NOT equal to an existing object in terms of equals, but IS in terms of name equality will result in the existing collection item with the equal name being removed.

org.gradle.api.NamedDomainObjectSet

A specialisation of NamedDomainObjectCollection that also implements Set and orders objects by their inherent name.

All object equality is determined in terms of object names. That is, calling remove() with an object that is NOT equal to an existing object in terms of equals, but IS in terms of name equality will result in the existing collection item with the equal name being removed.

org.gradle.api.Namer

A namer is capable of providing a name based on some inherent characteristic of an object.

org.gradle.language.plugins.NativeBasePlugin

A common base plugin for the native plugins.

Expects plugins to register the native components in the Project#getComponents() container, and defines a number of rules that act on these components to configure them.

  • Configures the {@value LifecycleBasePlugin#ASSEMBLE_TASK_NAME} task to build the development binary of the main component, if present. Expects the main component to be of type ProductionComponent and ComponentWithBinaries.
  • Adds an "assemble" task for each binary of the main component.
  • Adds tasks to compile and link an executable. Currently requires component implements internal API ConfigurableComponentWithExecutable.
  • Adds tasks to compile and link a shared library. Currently requires component implements internal API ConfigurableComponentWithSharedLibrary.
  • Adds tasks to compile and create a static library. Currently requires component implements internal API ConfigurableComponentWithStaticLibrary.
  • Adds outgoing configuration and artifacts for link file. Currently requires component implements internal API ConfigurableComponentWithLinkUsage.
  • Adds outgoing configuration and artifacts for runtime file. Currently requires component implements internal API ConfigurableComponentWithRuntimeUsage.
  • Maven publications. Currently requires component implements internal API PublicationAwareComponent.

org.gradle.nativeplatform.test.plugins.NativeBinariesTestPlugin

A plugin that sets up the infrastructure for testing native binaries.

org.gradle.nativeplatform.NativeBinary

Represents a particular binary artifact.

org.gradle.nativeplatform.NativeBinarySpec

Represents a binary artifact that is the result of building a native component.

org.gradle.nativeplatform.NativeComponentExtension

The configuration for native components generated by this build.

org.gradle.nativeplatform.plugins.NativeComponentModelPlugin

A plugin that sets up the infrastructure for defining native binaries.

org.gradle.nativeplatform.plugins.NativeComponentPlugin

A plugin that creates tasks used for constructing native binaries.

org.gradle.nativeplatform.NativeComponentSpec

Definition of a software component that is to be built by Gradle to run a on JVM platform.

org.gradle.nativeplatform.NativeDependencySet

Models a collection of native type dependencies.

org.gradle.nativeplatform.NativeExecutable

An executable native component that is built by Gradle.

org.gradle.nativeplatform.NativeExecutableBinary

A binary artifact for a NativeExecutable, targeted at a particular platform with specific configuration.

org.gradle.nativeplatform.NativeExecutableBinarySpec

An binary built by Gradle for a native application.

org.gradle.nativeplatform.NativeExecutableFileSpec

Specifies how to build and where to place a native executable file.

TODO:HH resolve naming conflict with existing NativeExecutableSpec

org.gradle.nativeplatform.NativeExecutableSpec

Definition of a native executable component that is to be built by Gradle.

org.gradle.nativeplatform.NativeInstallationSpec

Specifies the installation location for a native executable.

org.gradle.nativeplatform.NativeLibrary

A library component that is built by a gradle project.

org.gradle.nativeplatform.NativeLibraryBinary

A physical representation of a NativeLibrary component.

org.gradle.nativeplatform.NativeLibraryBinarySpec

Represents a binary artifact that is the result of building a native library component.

org.gradle.nativeplatform.NativeLibraryRequirement

A dependency on a native library within the build.

org.gradle.nativeplatform.NativeLibrarySpec

Definition of a native library component that is to be built by Gradle.

org.gradle.nativeplatform.platform.NativePlatform

A target platform for building native binaries. Each target platform is given a name, and may optionally be given a specific Architecture and/or OperatingSystem to target.

 model { platforms { windows_x86 { architecture "i386" operatingSystem "windows" } } } 

org.gradle.nativeplatform.toolchain.NativePlatformToolChain

A platform specific configurable tool chain.

org.gradle.language.nativeplatform.NativeResourceSet

A source set that provides resources.

org.gradle.nativeplatform.test.NativeTestSuiteBinarySpec

An executable which runs a suite of tests.

org.gradle.nativeplatform.test.NativeTestSuiteSpec

A component representing a suite of tests that will be executed together.

org.gradle.nativeplatform.test.plugins.NativeTestingBasePlugin

Common base plugin for all native testing plugins.

Expects plugins to register the native test suites in the Project#getComponents() container, and defines a number of rules that act on these components to configure them.

  • Adds a "test" task.
  • Configures the "test" task to run the tests of the test component, if present. Expects the test component to be of type TestSuiteComponent.

org.gradle.nativeplatform.toolchain.NativeToolChain

A set of compilers and linkers that are used together to construct a native binary.

org.gradle.nativeplatform.toolchain.NativeToolChainRegistry (extensions in package org.gradle.kotlin.dsl)
org.gradle.nativeplatform.toolchain.NativeToolChainRegistry

A container for NativeToolChains.

org.gradle.api.tasks.Nested

Marks a property as specifying a nested bean, whose properties should be checked for annotations.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

The implementation of the nested bean is tracked as an input, too. This allows tracking behavior such as org.gradle.api.Actions as task inputs.

This annotations supports org.gradle.api.provider.Provider values by treating the result of org.gradle.api.provider.Provider#get() as a nested bean.

This annotation supports Iterable values by treating each element as a separate nested bean. As a property name, the index of the element in the iterable prefixed by $ is used, e.g. $0. If the element implements org.gradle.api.Named, then the property name is composed of org.gradle.api.Named#getName() and the index, e.g. name$1. The ordering of the elements in the iterable is crucial for for reliable up-to-date checks and caching.

This annotation supports $java.util.Map values by treating each value of the map as a separate nested bean. The keys of the map are used as property names.

org.gradle.api.NonExtensible

Indicates that the type, when DSL enhanced, does not support extensibility.

This means that it will not be enhanced with org.gradle.api.plugins.ExtensionAware.

org.gradle.api.NonNullApi

Marks a type or a whole package as providing a non-null API by default. All parameter and return types are assumed to be Nonnull unless specifically marked as Nullable.

org.gradle.api.specs.NotSpec

A org.gradle.api.specs.Spec implementation which negates another Spec.

org.gradle.api.Nullable

Indicates that the value of an element can be null.

org.gradle.api.plugins.ObjectConfigurationAction (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.ObjectConfigurationAction

An ObjectConfigurationAction allows you to apply org.gradle.api.Plugins and scripts to an object or objects.

org.gradle.api.model.ObjectFactory (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.model.ObjectFactory

A factory for creating various kinds of model objects.

An instance of the factory can be injected into a task or plugin by annotating a public constructor or method with javax.inject.Inject. It is also available via org.gradle.api.Project#getObjects().

org.gradle.nativeplatform.ObjectFile

LanguageOutputType marking object file output type.

org.gradle.nativeplatform.tasks.ObjectFilesToBinary

A task that combines a set of object files into a single binary.

org.gradle.api.reflect.ObjectInstantiationException

Thrown when an object cannot be instantiated.

org.gradle.language.objectivec.tasks.ObjectiveCCompile

Compiles Objective-C source files into object files.

org.gradle.language.objectivec.plugins.ObjectiveCLangPlugin

Adds core Objective-C language support.

org.gradle.language.objectivec.plugins.ObjectiveCPlugin

A plugin for projects wishing to build native binary components from Objective-C sources.

Automatically includes the ObjectiveCLangPlugin for core Objective-C support and the org.gradle.nativeplatform.plugins.NativeComponentPlugin for native component support.

  • Creates a org.gradle.language.objectivec.tasks.ObjectiveCCompile task for each org.gradle.language.objectivec.ObjectiveCSourceSet to compile the Objective-C sources.

org.gradle.language.objectivec.tasks.ObjectiveCPreCompiledHeaderCompile

Compiles Objective C header source files into object files.

org.gradle.language.objectivec.ObjectiveCSourceSet

A set of Objective-C source files.

An ObjectiveC source set contains a set of source files, together with an optional set of exported header files.

 apply plugin: "objective-c" model { components { main(NativeLibrarySpec) { sources { objc { source { srcDirs "src/main/objectiveC", "src/shared/objectiveC" include "**/*.m" } exportedHeaders { srcDirs "src/main/include" } } } } } } 

org.gradle.language.objectivecpp.tasks.ObjectiveCppCompile

Compiles Objective-C++ source files into object files.

org.gradle.language.objectivecpp.plugins.ObjectiveCppLangPlugin

Adds core Objective-Cpp language support.

org.gradle.language.objectivecpp.plugins.ObjectiveCppPlugin

A plugin for projects wishing to build native binary components from Objective-C++ sources.

Automatically includes the ObjectiveCppLangPlugin for core Objective-C++ support and the NativeComponentPlugin for native component support.

  • Creates a org.gradle.language.objectivecpp.tasks.ObjectiveCppCompile task for each org.gradle.language.objectivecpp.ObjectiveCppSourceSet to compile the Objective-C++ sources.

org.gradle.language.objectivecpp.tasks.ObjectiveCppPreCompiledHeaderCompile

Compiles Objective C++ header source files into object files.

org.gradle.language.objectivecpp.ObjectiveCppSourceSet

A set of Objective-C++ source files.

An Objective-C++ source set contains a set of source files, together with an optional set of exported header files.

 apply plugin: "objective-cpp" model { components { main(NativeLibrarySpec) { sources { objcpp { source { srcDirs "src/main/objectiveCpp", "src/shared/objectiveCpp" include "**/*.mm" } exportedHeaders { srcDirs "src/main/include" } } } } } } 

org.gradle.nativeplatform.platform.OperatingSystem

A machine operating system. Operating System Aliases Windows "windows" GNU/Linux "linux" MacOS "osx", "mac os x", "darwin" Solaris "solaris", "sunos"

org.gradle.nativeplatform.OperatingSystemFamily

Represents the operating system of a configuration. Typical operating system include Windows, Linux, and macOS. This interface allows the user to customize operating systems by implementing this interface.

org.gradle.tooling.events.OperationDescriptor

Describes an operation for which an event has occurred.

You can use equals() to determine whether 2 different descriptors refer to the same operation.

The subtypes of this interface define specific types of operations, such as task execution.

org.gradle.tooling.events.OperationResult

Describes the result of running an operation.

org.gradle.tooling.events.OperationType

Enumerates the different types of operations for which progress events can be received.

org.gradle.api.tasks.options.Option

Marks a property of a org.gradle.api.Task as being configurable from the command-line.

This annotation should be attached to a field or a setter method. When attached to a field, #option() will use the name of the field by default. When attached to a method, #option() must be specified.

An option may have one of the following types:

  • boolean
  • Boolean
  • Enum
  • List&lt;Enum&gt;
  • List&lt;String&gt;
  • String

org.gradle.external.javadoc.OptionLessJavadocOptionFileOption

Represents a Javadoc option.

org.gradle.api.tasks.options.OptionValues

Marks a method on a org.gradle.api.Task as providing the possible values for a String or List&lt;String&gt; Option. At most one option values method may be provided for a particular option.

This annotation should be attached to a getter method that returns a java.util.Collection of possible values. The entries in the collection may be of any type. If necessary, they are transformed into String by calling toString().

org.gradle.api.tasks.Optional

Marks a task property as optional. This means that a value does not have to be specified for the property, but any value specified must meet the validation constraints for the property.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

  • org.gradle.api.tasks.Input
  • org.gradle.api.tasks.InputFile
  • org.gradle.api.tasks.InputDirectory
  • org.gradle.api.tasks.InputFiles
  • org.gradle.api.tasks.OutputFile
  • org.gradle.api.tasks.OutputDirectory

org.gradle.api.specs.OrSpec

A CompositeSpec which requires any one of its specs to be true in order to evaluate to true. Uses lazy evaluation.

org.gradle.api.plugins.osgi.OsgiManifest

Represents a manifest file for a JAR containing an OSGi bundle.

org.gradle.api.plugins.osgi.OsgiPlugin

A Plugin which extends the JavaPlugin to add OSGi meta-information to the project Jars.

org.gradle.api.plugins.osgi.OsgiPluginConvention

Is mixed into the project when applying the org.gradle.api.plugins.osgi.OsgiPlugin.

org.gradle.plugins.ide.eclipse.model.Output

A classpath entry representing an output folder.

org.gradle.api.tasks.OutputDirectories

Marks a property as specifying one or more output directories for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the directory paths or task output to those directories have been modified since the task was last run.

When the annotated property is a java.util.Map, then each output directory will be associated with an identity. For cacheable tasks this is a requirement. The keys of the map must be non-empty strings. The values of the map will be evaluated to individual directories as per org.gradle.api.Project#file(Object).

Otherwise the given directories will be evaluated as per org.gradle.api.Project#files(Object...), and task output caching will be disabled for the task.

org.gradle.api.tasks.OutputDirectory

Marks a property as specifying an output directory for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the directory path or task output to that directory has been modified since the task was last run.

org.gradle.api.tasks.OutputFile

Marks a property as specifying an output file for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the file path or contents are different to when the task was last run.

org.gradle.api.tasks.OutputFiles

Marks a property as specifying one or more output files for a task.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the file paths or contents are different to when the task was last run.

When the annotated property is a java.util.Map, then each output file will be associated with an identity. For cacheable tasks this is a requirement. The keys of the map must be non-empty strings. The values of the map will be evaluated to individual files as per org.gradle.api.Project#file(Object).

Otherwise the given files will be evaluated as per org.gradle.api.Project#files(Object...), and task output caching will be disabled for the task.

org.gradle.swiftpm.Package

Represents a Swift Package Manager package.

org.gradle.concurrent.ParallelismConfiguration

A ParallelismConfiguration defines the parallel settings for a Gradle build.

org.gradle.tooling.provider.model.ParameterizedToolingModelBuilder

A ToolingModelBuilder which can be parametrized by the client.

The parameter type T does not need to implement the interface defined in the client side, but it does need to have the same structure. The Tooling API will create a view from the client side parameter type to the one defined in this model builder, and deal automatically with missing methods in order to allow evolution of the models.

All classes implementing this interface should also implement methods from ToolingModelBuilder, which will be used to determine if a model can be built by the current builder and to generate the model in case no parameter is passed from the client. The parameter type should be bound to the model type.

org.gradle.api.artifacts.repositories.PasswordCredentials

A username/password credentials that can be used to login to password-protected remote repository.

org.gradle.api.credentials.PasswordCredentials

A username/password credentials that can be used to login to something protected by a username and password.

org.gradle.plugins.ide.idea.model.Path

Represents a path in a format as used often in ipr and iml files.

org.gradle.model.Path

Specifies a model path on a parameter

org.gradle.plugins.ide.idea.model.PathFactory

Path Factory.

org.gradle.api.tasks.PathSensitive

Annotates a task file property, specifying which part of the file paths should be considered during up-to-date checks.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

org.gradle.api.tasks.PathSensitivity

Enumeration of different path handling strategies for task properties.

org.gradle.api.PathValidation

An enumeration for describing validation policies for file paths.

org.gradle.api.tasks.util.PatternFilterable

A PatternFilterable represents some file container which Ant-style include and exclude patterns or specs can be applied to.

Patterns may include:

  • '*' to match any number of characters
  • '?' to match any single character
  • '**' to match any number of directories or files

Either '/' or '\' may be used in a pattern to separate directories. Patterns ending with '/' or '\' will have '**' automatically appended.

Examples:

 all files ending with 'jsp' (including subdirectories) **/*.jsp all files beginning with 'template_' in the level1/level2 directory level1/level2/template_* all files (including subdirectories) beneath src/main/webapp src/main/webapp/ all files beneath any .svn directory (including subdirectories) under src/main/java src/main/java/**/.svn/** 

You may also use a closure or Spec to specify which files to include or exclude. The closure or Spec is passed a org.gradle.api.file.FileTreeElement, and must return a boolean value.

If no include patterns or specs are specified, then all files in this container will be included. If any include patterns or specs are specified, then a file is included if it matches any of the patterns or specs.

If no exclude patterns or spec are specified, then no files will be excluded. If any exclude patterns or specs are specified, then a file is include only if it matches none of the patterns or specs.

org.gradle.api.tasks.util.PatternSet

Standalone implementation of PatternFilterable.

org.gradle.plugins.signing.signatory.pgp.PgpKeyId

A normalised form for keys, which are friendliest for users as hex strings but used internally as longs.

org.gradle.plugins.signing.signatory.pgp.PgpSignatory

PGP signatory from PGP key and password.

org.gradle.plugins.signing.signatory.pgp.PgpSignatoryFactory

Creates PgpSignatory instances.

org.gradle.plugins.signing.signatory.pgp.PgpSignatoryProvider

A SignatoryProvider of PgpSignatory instances.

org.gradle.platform.base.Platform

The platform or runtime that a binary is designed to run on. Examples: the JvmPlatform defines a java runtime, while the NativePlatform defines the Operating System and Architecture for a native app.

org.gradle.platform.base.PlatformAwareComponentSpec

Defines Platform specific operations for ComponentSpecs

org.gradle.platform.base.PlatformContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.platform.base.PlatformContainer

A container of Platforms.

org.gradle.language.java.tasks.PlatformJavaCompile

A platform-aware Java compile task.

org.gradle.language.scala.tasks.PlatformScalaCompile

A platform-aware Scala compile task.

org.gradle.play.PlayApplicationBinarySpec

Represents a binary artifact that is the result of building a Play application software component.

org.gradle.play.plugins.PlayApplicationPlugin

Plugin for Play Framework component support. Registers the org.gradle.play.PlayApplicationSpec component type for the components container.

org.gradle.play.PlayApplicationSpec

Definition of a Play Framework software component that is built by Gradle.

org.gradle.play.tasks.PlayCoffeeScriptCompile

Task for compiling CoffeeScript sources into JavaScript.

org.gradle.play.plugins.PlayCoffeeScriptPlugin

Plugin for adding coffeescript compilation to a Play application. Adds support for defining org.gradle.language.coffeescript.CoffeeScriptSourceSet source sets. A "coffeeScript" source set is created by default.

org.gradle.play.distribution.PlayDistribution

Represents a Play distribution package

org.gradle.play.distribution.PlayDistributionContainer

Manages a set of org.gradle.api.distribution.Distribution objects.

org.gradle.play.plugins.PlayDistributionPlugin

A plugin that adds a distribution zip to a Play application build.

org.gradle.play.plugins.ide.PlayIdePlugin

Plugin for configuring IDE plugins when the project uses the Play Framework component support.

NOTE: This currently supports configuring the 'idea' plugin only.

org.gradle.play.plugins.PlayJavaScriptPlugin

Plugin for adding javascript processing to a Play application. Registers "javascript" language support with the org.gradle.language.javascript.JavaScriptSourceSet.

org.gradle.play.platform.PlayPlatform

Defines and configures a Play Framework environment including versions of Play, Scala and Java.

org.gradle.play.PlayPlatformAwareComponentSpec

Platform aware aspect of a Play Framework software component.

org.gradle.play.plugins.PlayPlugin

Plugin for Play Framework component support. Registers the org.gradle.play.PlayApplicationSpec component type for the components container.

org.gradle.play.plugins.PlayPluginConfigurations (extensions in package org.gradle.kotlin.dsl)
org.gradle.play.plugins.PlayPluginConfigurations

Conventional locations and names for play plugins.

org.gradle.play.plugins.PlayRoutesPlugin

Plugin for compiling Play routes sources in a Play application.

org.gradle.play.tasks.PlayRun

Task to run a Play application.

org.gradle.play.plugins.PlayTestPlugin

Plugin for executing tests from a Play Framework application.

org.gradle.play.toolchain.PlayToolChain

A set of tools for building applications using the Play Framework.

org.gradle.play.plugins.PlayTwirlPlugin

Plugin for compiling Twirl sources in a Play application.

org.gradle.api.Plugin

A Plugin represents an extension to Gradle. A plugin applies some configuration to a target object. Usually, this target object is a org.gradle.api.Project, but plugins can be applied to any type of objects.

org.gradle.api.plugins.PluginAware (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.PluginAware

Something that can have plugins applied to it.

The plugin manager can be used for applying and detecting whether plugins have been applied.

For more on writing and applying plugins, see org.gradle.api.Plugin.

org.gradle.api.plugins.PluginCollection

A PluginCollection represents a collection of org.gradle.api.Plugin instances.

org.gradle.api.plugins.PluginContainer

A PluginContainer is used to manage a set of org.gradle.api.Plugin instances applied to a particular project.

Plugins can be specified using either an id or type. The id of a plugin is specified using a META-INF/gradle-plugins/${id}.properties classpath resource.

org.gradle.plugin.devel.PluginDeclaration

Describes a Gradle plugin under development.

org.gradle.plugin.use.PluginDependenciesSpec (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugin.use.PluginDependenciesSpec

The DSL for declaring plugins to use in a script.

In a build script, the plugins {} script block API is of this type. That is, you can use this API in the body of the plugins script block to declare plugins to be used for the script.

Relationship with the apply() method

The plugins {} block serves a similar purpose to the org.gradle.api.plugins.PluginAware#apply(java.util.Map) method that can be used to apply a plugin directly to a Project object or similar. A key difference is that plugins applied via the plugins {} block are conceptually applied to the script, and by extension the script target. At this time there is no observable practical difference between the two approaches with regard to the end result. The plugins {} block is a new, incubating, Gradle feature that will evolve to offer benefits over the apply() approach.

Strict Syntax

The plugins {} block only allows a strict subset of the full build script programming language. Only the API of this type can be used, and values must be literal (e.g. constant strings, not variables). Moreover, the plugins {} block must be the first code of a build script. There is one exception to this, in that the buildscript {} block (used for declaring script dependencies) must precede it.

This implies the following constraints:

Available Plugins Core Plugins

Core Gradle plugins are able to be applied using the plugins {} block. Core plugins must be specified without a version number, and can have a qualified or unqualified id. That is, the java plugin can be used via:

 plugins { id 'java' } 

Or via:

 plugins { id 'org.gradle.java' } 

Core Gradle plugins use the org.gradle namespace.

For the list of available core plugins for a particular Gradle version, please consult the User Guide.

Community Plugins

Non-core plugins are available from the Gradle Plugin Portal. These plugins are contributed by users of Gradle to extend Gradle's functionality. Visit plugins.gradle.org to browse the available plugins and versions.

To use a community plugin, the fully qualified id must be specified along with a version.

org.gradle.kotlin.dsl.PluginDependenciesSpecScope

Receiver for the plugins block.

org.gradle.plugin.use.PluginDependencySpec (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugin.use.PluginDependencySpec

A mutable specification of a dependency on a plugin.

Can be used to specify the version of the plugin to use.

See PluginDependenciesSpec for more information about declaring plugin dependencies.

org.gradle.plugin.use.PluginId

A description of a plugin.

org.gradle.api.plugins.PluginInstantiationException

A PluginInstantiationException is thrown when a plugin cannot be instantiated.

org.gradle.plugin.management.PluginManagementSpec

Configures how plugins are resolved.

org.gradle.api.plugins.PluginManager

Facilitates applying plugins and determining which plugins have been applied to a PluginAware object.

org.gradle.plugin.management.PluginRequest

Contains information about a plugin that has been requested for resolution.

org.gradle.plugin.management.PluginResolutionStrategy

Allows modification of PluginRequests before they are resolved.

org.gradle.plugin.management.PluginResolveDetails

Allows plugin resolution rules to inspect a requested plugin and modify which target plugin will be used.

org.gradle.plugin.devel.tasks.PluginUnderTestMetadata

Custom task for generating the metadata for a plugin user test.

org.gradle.api.plugins.quality.Pmd

Runs a set of static code analysis rules on Java source code files and generates a report of problems found.

org.gradle.api.plugins.quality.PmdExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.plugins.quality.PmdExtension

Configuration options for the PMD plugin.

org.gradle.api.plugins.quality.PmdPlugin

A plugin for the PMD source code analyzer.

Declares a pmd configuration which needs to be configured with the PMD library to be used.

For each source set that is to be analyzed, a Pmd task is created and configured to analyze all Java code.

All PMD tasks (including user-defined ones) are added to the check lifecycle task.

org.gradle.api.plugins.quality.PmdReports

The reporting configuration for the Pmd task.

org.gradle.api.PolymorphicDomainObjectContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.PolymorphicDomainObjectContainer

A NamedDomainObjectContainer that allows to create domain objects with different types.

org.gradle.kotlin.dsl.PolymorphicDomainObjectContainerDelegateProvider

A property delegate that creates elements of the given type with the given configuration in the given container.

org.gradle.kotlin.dsl.PolymorphicDomainObjectContainerGettingDelegate

A property delegate that gets elements of the given type in the given container.

org.gradle.kotlin.dsl.PolymorphicDomainObjectContainerGettingDelegateProvider

A property delegate that gets elements of the given type from the given container and applies the given configuration.

org.gradle.api.artifacts.maven.PomFilterContainer

Manages a set of MavenPom instances and their associated PublishFilter instances.

org.gradle.nativeplatform.PrebuiltLibraries

A container of PrebuiltLibrary instances.

org.gradle.nativeplatform.PrebuiltLibrary

A library component that is not built by gradle.

org.gradle.nativeplatform.PrebuiltSharedLibraryBinary

A shared library that exists at a known location on the filesystem.

org.gradle.nativeplatform.PrebuiltStaticLibraryBinary

A static library that exists at a known location on the filesystem.

org.gradle.kotlin.dsl.plugins.precompiled.PrecompiledScriptPlugins
org.gradle.nativeplatform.tasks.PrefixHeaderFileGenerateTask

Generates a prefix header file from a list of headers to be precompiled.

org.gradle.nativeplatform.PreprocessingTool

A tool that permits configuration of the C preprocessor.

org.gradle.process.ProcessForkOptions

Specifies the options to use to fork a process.

org.gradle.language.jvm.tasks.ProcessResources

Copies resources from their source to their target directory, potentially processing them. Makes sure no stale resources remain in the target directory.

org.gradle.swiftpm.Product

A product in a Swift Package Manager package.

org.gradle.language.ProductionComponent

Represents a component that is the main product of a project.

org.gradle.language.cpp.ProductionCppComponent

Represents a C++ component that is the main product of a project.

org.gradle.language.swift.ProductionSwiftComponent

Represents a Swift component that is the main product of a project.

org.gradle.tooling.ProgressEvent

Some information about a piece of work of a long running operation.

org.gradle.tooling.events.ProgressEvent

Root interface for all events that signal progress while executing an operation. For example, an operation can be the execution of a build, of a task, of a test, etc. A progress event can, for example, signal that a test has started, a task has finished, etc.

org.gradle.tooling.ProgressListener

A listener which is notified as some long running operation makes progress.

org.gradle.tooling.events.ProgressListener

A listener which is notified when operations that are executed as part of running a build make progress.

org.gradle.api.Project (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.ide.eclipse.model.Project

Represents the customizable elements of an eclipse project file. (via XML hooks everything is customizable).

org.gradle.plugins.ide.idea.model.Project

Represents the customizable elements of an ipr (via XML hooks everything of the ipr is customizable).

org.gradle.api.Project

This interface is the main API you use to interact with Gradle from your build file. From a Project, you have programmatic access to all of Gradle's features.

Lifecycle

There is a one-to-one relationship between a Project and a {@value #DEFAULT_BUILD_FILE} file. During build initialisation, Gradle assembles a Project object for each project which is to participate in the build, as follows:

  • Create a org.gradle.api.initialization.Settings instance for the build.
  • Evaluate the {@value org.gradle.api.initialization.Settings#DEFAULT_SETTINGS_FILE} script, if present, against the org.gradle.api.initialization.Settings object to configure it.
  • Use the configured org.gradle.api.initialization.Settings object to create the hierarchy of Project instances.
  • Finally, evaluate each Project by executing its {@value #DEFAULT_BUILD_FILE} file, if present, against the project. The projects are evaluated in breadth-wise order, such that a project is evaluated before its child projects. This order can be overridden by calling #evaluationDependsOnChildren() or by adding an explicit evaluation dependency using #evaluationDependsOn(String).
Tasks

A project is essentially a collection of Task objects. Each task performs some basic piece of work, such as compiling classes, or running unit tests, or zipping up a WAR file. You add tasks to a project using one of the create() methods on TaskContainer, such as TaskContainer#create(String). You can locate existing tasks using one of the lookup methods on TaskContainer, such as org.gradle.api.tasks.TaskCollection#getByName(String).

Dependencies

A project generally has a number of dependencies it needs in order to do its work. Also, a project generally produces a number of artifacts, which other projects can use. Those dependencies are grouped in configurations, and can be retrieved and uploaded from repositories. You use the org.gradle.api.artifacts.ConfigurationContainer returned by #getConfigurations() method to manage the configurations. The returned by #getDependencies() method to manage the dependencies. The org.gradle.api.artifacts.dsl.ArtifactHandler returned by #getArtifacts() method to manage the artifacts. The org.gradle.api.artifacts.dsl.RepositoryHandler returned by method to manage the repositories.

Multi-project Builds

Projects are arranged into a hierarchy of projects. A project has a name, and a fully qualified path which uniquely identifies it in the hierarchy.

Plugins

Plugins can be used to modularise and reuse project configuration. Plugins can be applied using the PluginAware#apply(java.util.Map) method, or by using the org.gradle.plugin.use.PluginDependenciesSpec plugins script block.

Properties

Gradle executes the project's build file against the Project instance to configure the project. Any property or method which your script uses is delegated through to the associated Project object. This means, that you can use any of the methods and properties on the Project interface directly in your script.

For example:

 defaultTasks('some-task') // Delegates to Project.defaultTasks() reportsDir = file('reports') // Delegates to Project.file() and the Java Plugin 

You can also access the Project instance using the project property. This can make the script clearer in some cases. For example, you could use project.name rather than name to access the project's name.

A project has 5 property 'scopes', which it searches for properties. You can access these properties by name in your build file, or by calling the project's #property(String) method. The scopes are:

  • The Project object itself. This scope includes any property getters and setters declared by the Project implementation class. For example, #getRootProject() is accessible as the rootProject property. The properties of this scope are readable or writable depending on the presence of the corresponding getter or setter method.
  • The extra properties of the project. Each project maintains a map of extra properties, which can contain any arbitrary name -> value pair. Once defined, the properties of this scope are readable and writable. See extra properties for more details.
  • The extensions added to the project by the plugins. Each extension is available as a read-only property with the same name as the extension.
  • The convention properties added to the project by the plugins. A plugin can add properties and methods to a project through the project's Convention object. The properties of this scope may be readable or writable, depending on the convention objects.
  • The tasks of the project. A task is accessible by using its name as a property name. The properties of this scope are read-only. For example, a task called compile is accessible as the compile property.
  • The extra properties and convention properties are inherited from the project's parent, recursively up to the root project. The properties of this scope are read-only.

When reading a property, the project searches the above scopes in order, and returns the value from the first scope it finds the property in. If not found, an exception is thrown. See #property(String) for more details.

When writing a property, the project searches the above scopes in order, and sets the property in the first scope it finds the property in. If not found, an exception is thrown. See #setProperty(String, Object) for more details.

Extra Properties All extra properties must be defined through the "ext" namespace. Once an extra property has been defined, it is available directly on the owning object (in the below case the Project, Task, and sub-projects respectively) and can be read and updated. Only the initial declaration that needs to be done via the namespace.
 project.ext.prop1 = "foo" task doStuff { ext.prop2 = "bar" } subprojects { ext.${prop3} = false } 
Reading extra properties is done through the "ext" or through the owning object.
 ext.isSnapshot = version.endsWith("-SNAPSHOT") if (isSnapshot) { // do snapshot stuff } 
Dynamic Methods

A project has 5 method 'scopes', which it searches for methods:

  • The Project object itself.
  • The build file. The project searches for a matching method declared in the build file.
  • The extensions added to the project by the plugins. Each extension is available as a method which takes a closure or org.gradle.api.Action as a parameter.
  • The convention methods added to the project by the plugins. A plugin can add properties and method to a project through the project's Convention object.
  • The tasks of the project. A method is added for each task, using the name of the task as the method name and taking a single closure or org.gradle.api.Action parameter. The method calls the Task#configure(groovy.lang.Closure) method for the associated task with the provided closure. For example, if the project has a task called compile, then a method is added with the following signature: void compile(Closure configureClosure).
  • The methods of the parent project, recursively up to the root project.
  • A property of the project whose value is a closure. The closure is treated as a method and called with the provided parameters. The property is located as described above.

org.gradle.testfixtures.ProjectBuilder

Creates dummy instances of org.gradle.api.Project which you can use in testing custom task and plugin implementations.

To create a project instance:

  1. Create a ProjectBuilder instance by calling #builder().
  2. Optionally, configure the builder.
  3. Call #build() to create the Project instance.

You can reuse a builder to create multiple Project instances.

The ProjectBuilder implementation bundled with Gradle 3.0 and 3.1 suffers from a binary compatibility issue exposed by applying plugins compiled with Gradle 2.7 and earlier. Applying those pre-compiled plugins in a ProjectBuilder context will result in a ClassNotFoundException.

org.gradle.api.artifacts.component.ProjectComponentIdentifier

An identifier for a component instance that is built as part of the current build.

org.gradle.api.artifacts.component.ProjectComponentSelector

Criteria for selecting a component instance that is built as part of the current build.

org.gradle.api.ProjectConfigurationException

Indicates a problem that occurs during project configuration (evaluation) phase.

org.gradle.tooling.ProjectConnection

Represents a long-lived connection to a Gradle project. You obtain an instance of a ProjectConnection by using org.gradle.tooling.GradleConnector#connect().

 try (ProjectConnection connection = GradleConnector.newConnector() .forProjectDirectory(new File("someFolder")) .connect()) { //obtain some information from the build BuildEnvironment environment = connection.model(BuildEnvironment.class).get(); //run some tasks connection.newBuild() .forTasks("tasks") .setStandardOutput(System.out) .run(); } 
Thread safety information

All implementations of ProjectConnection are thread-safe, and may be shared by any number of threads.

All notifications from a given ProjectConnection instance are delivered by a single thread at a time. Note, however, that the delivery thread may change over time.

org.gradle.tooling.model.ProjectDependency

Represents a dependency on another project.

org.gradle.plugins.ide.eclipse.model.ProjectDependency

A classpath entry representing a project dependency.

org.gradle.api.artifacts.ProjectDependency

A ProjectDependency is a Dependency on another project in the current project hierarchy.

org.gradle.platform.base.ProjectDependencySpec

A dependency onto a library published by a project.

org.gradle.platform.base.ProjectDependencySpecBuilder

A builder of a ProjectDependencySpec.

org.gradle.api.initialization.ProjectDescriptor

A ProjectDescriptor declares the configuration required to create and evaluate a .

A ProjectDescriptor is created when you add a project to the build from the settings script, using or Settings#includeFlat(String...). You can access the descriptors using one of the lookup methods on the Settings object.

org.gradle.api.ProjectEvaluationListener

An ProjectEvaluationListener is notified when a project is evaluated. You add can add an ProjectEvaluationListener to a org.gradle.api.invocation.Gradle using .

org.gradle.tooling.model.ProjectIdentifier

Identifies a Gradle project.

A Gradle Project is a project in a multi-project Gradle build or a single "standalone" project.

org.gradle.api.file.ProjectLayout

Provides access to several important locations for a project. An instance of the factory can be injected into a task or plugin by annotating a public constructor or method with javax.inject.Inject. It is also available via org.gradle.api.Project#getLayout().

org.gradle.plugins.ide.idea.model.ProjectLibrary

A project-level IDEA library.

org.gradle.tooling.model.ProjectModel

Represents a model that is associated with some Gradle project.

org.gradle.tooling.model.gradle.ProjectPublications

A model providing information about the publications of a Gradle project.

org.gradle.api.tasks.diagnostics.ProjectReportTask

Displays a list of projects in the build. An instance of this type is used when you execute the projects task from the command-line.

org.gradle.api.plugins.ProjectReportsPlugin

A Plugin which adds some project visualization report tasks to a project.

org.gradle.api.plugins.ProjectReportsPluginConvention

The conventional configuration for the `ProjectReportsPlugin`.

org.gradle.language.base.ProjectSourceSet

A container of org.gradle.language.base.LanguageSourceSets. Added to a project by the org.gradle.language.base.plugins.LanguageBasePlugin.

org.gradle.api.ProjectState

ProjectState provides information about the execution state of a project.

org.gradle.plugins.ide.api.PropertiesFileContentMerger

Models the generation/parsing/merging capabilities. Adds properties-related hooks.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseJdt and others.

org.gradle.plugins.ide.api.PropertiesGeneratorTask

A convenience superclass for those tasks which generate Properties configuration files from a domain object of type T.

org.gradle.api.provider.Property (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.provider.Property

A Provider representation for capturing the state of a property. The value can be provided by using the method #set(Object) or #set(Provider).

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory method org.gradle.api.model.ObjectFactory#property(Class). There are also several specialized subtypes of this interface that can be created using various other factory methods.

org.gradle.kotlin.dsl.PropertyDelegate

Provides efficient access to a property.

org.gradle.plugins.ide.api.PropertyListGeneratorTask

A convenience superclass for those tasks which generate Property List configuration files from a domain object of type T.

org.gradle.api.tasks.diagnostics.PropertyReportTask

Displays the properties of a project. An instance of this type is used when you execute the properties task from the command-line.

org.gradle.api.provider.PropertyState (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.provider.PropertyState

A Provider representation for capturing the state of a property. The value can be provided by using the method #set(Object) or #set(Provider).

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory methods org.gradle.api.Project#property(java.lang.Class) or org.gradle.api.provider.ProviderFactory#property(java.lang.Class).

org.gradle.api.provider.Provider

A container object that provides a value of a specific type. The value can be retrieved by the method #get() or #getOrNull().

A provider may not always have a value available, for example when the value may not yet be known but will be known at some point in the future. When a value is not available, #isPresent() returns false and retrieving the value will fail with an exception.

A provider may not always provide the same value. Although there are no methods on this interface to change the value, the provider implementation may be mutable or use values from some changing source.

A provider may provide a value that is mutable and that changes over time.

A typical use of a provider is to pass values from one DSL element to another, e.g. from an extension to a task. Providers also allow expensive computations to be deferred until their value is actually needed, usually at task execution time.

For a provider whose value can be mutated, see Property.

Do not use Provider<File>. Use org.gradle.api.file.Directory or org.gradle.api.file.RegularFile instead.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory methods org.gradle.api.Project#provider(java.util.concurrent.Callable) or org.gradle.api.provider.ProviderFactory#provider(java.util.concurrent.Callable).

org.gradle.api.provider.ProviderFactory

A factory for creating instances of Provider and PropertyState.

An instance of the factory can be injected into a task or plugin by annotating a public constructor or method with javax.inject.Inject.

 public class MyTask extends DefaultTask { // injection into a constructor @javax.inject.Inject public MyTask(ProviderFactory providerFactory) { } // injection into a method @javax.inject.Inject public ProviderFactory getProviderFactory() { throw new UnsupportedOperationException(); } } 

An instance of the factory is also available using Project#getProviders()

org.gradle.play.PublicAssets

A set of public assets added to a binary.

org.gradle.api.publish.Publication

A publication is a description of a consumable representation of one or more artifacts, and possibly associated metadata.

org.gradle.api.publish.PublicationArtifact

An artifact published as part of a Publication.

org.gradle.api.publish.PublicationContainer

A PublicationContainer is responsible for creating and managing Publication instances. The set of available publication types is dependent on the application of particular plugins:

  • The org.gradle.api.publish.maven.plugins.MavenPublishPlugin makes it possible to create org.gradle.api.publish.maven.MavenPublication instances.
  • The org.gradle.api.publish.ivy.plugins.IvyPublishPlugin makes it possible to create org.gradle.api.publish.ivy.IvyPublication instances.
 apply plugin: 'ivy-publish' publishing.publications.create('publication-name', IvyPublication) { // Configure the ivy publication here } 
The usual way to add publications is via a configuration block. See the documentation for PublishingExtension#publications(org.gradle.api.Action) for examples of how to create and configure publications.

org.gradle.api.artifacts.PublishArtifact

A PublishArtifact is an artifact produced by a project.

org.gradle.api.artifacts.PublishArtifactSet

A set of artifacts to be published.

org.gradle.api.artifacts.PublishException

A PublishException is thrown when a dependency configuration cannot be published for some reason.

org.gradle.api.artifacts.maven.PublishFilter

A filter for artifacts to be published.

org.gradle.api.publish.ivy.tasks.PublishToIvyRepository

Publishes an IvyPublication to an IvyArtifactRepository.

org.gradle.api.publish.maven.tasks.PublishToMavenLocal

Publishes a org.gradle.api.publish.maven.MavenPublication to the Maven Local repository.

org.gradle.api.publish.maven.tasks.PublishToMavenRepository

Publishes a org.gradle.api.publish.maven.MavenPublication to a MavenArtifactRepository.

org.gradle.api.component.PublishableComponent

Represents a component that can be published.

org.gradle.api.publish.PublishingExtension

The configuration of how to “publish” the different components of a project.

org.gradle.api.publish.plugins.PublishingPlugin

Installs a org.gradle.api.publish.PublishingExtension with name {@value org.gradle.api.publish.PublishingExtension#NAME}.

org.gradle.model.ReadOnlyModelViewException

Thrown when an attempt is made to change the value of a model element that is not writable at the time.

org.gradle.api.resources.ReadableResource

A resource that can be read. The simplest example is a file.

org.gradle.api.file.RegularFile

Represents a regular file at a fixed location on the file system. A regular file is a file that is not a directory and is not some special kind of file such as a device.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created from a Directory instance using the Directory#file(String) method or via various methods on ProjectLayout such as ProjectLayout#getProjectDirectory().

org.gradle.api.file.RegularFileProperty

Represents some configurable regular file location, whose value is mutable and not necessarily currently known until later.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the ProjectLayout#fileProperty() method.

org.gradle.api.file.RegularFileVar

Represents some configurable regular file location, whose value is mutable and not necessarily currently known until later.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the ProjectLayout#newFileVar() method.

org.gradle.api.file.RelativePath

Represents a relative path from some base directory to a file. Used in file copying to represent both a source and target file path when copying files.

RelativePath instances are immutable.

org.gradle.api.reporting.Report

A file based report to be created.

Tasks that produce reports expose instances of this type for configuration via the Reporting interface.

org.gradle.api.reporting.ReportContainer

A container of Report objects, that represent potential reports.

Things that produce reports (typically tasks) expose a report container that contains Report objects for each possible report that they can produce. Each report object can be configured individually, including whether or not it should be produced by way of its enabled property.

ReportContainer implementations are immutable in that standard collection methods such as add(), remove() and clear() will throw an ImmutableViolationException. However, implementations may provide new methods that allow the addition of new report object and/or the removal of existing report objects.

org.gradle.api.reporting.Reporting

An object that provides reporting options.

Tasks that produce reports as part of their execution expose configuration options of those reports via these methods. The Reporting interface is parameterized, where the parameter denotes the specific type of reporting container that is exposed. The specific type of the reporting container denotes the different types of reports available.

For example, given a task such as:

 class MyTask implements Reporting<MyReportContainer> { // implementation } interface MyReportContainer extends ReportContainer<Report> { Report getHtml(); Report getCsv(); } 

The reporting aspects of such a task can be configured as such:

 task my(type: MyTask) { reports { html.enabled = true csv.enabled = false } } 

See the documentation for the specific ReportContainer type for the task for information on report types and options.

org.gradle.api.plugins.ReportingBasePlugin

A Plugin which provides the basic skeleton for reporting.

This plugin adds the following extension objects to the project:

  • org.gradle.api.reporting.ReportingExtension

org.gradle.api.reporting.ReportingExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.reporting.ReportingExtension

A project extension named "reporting" that provides basic reporting settings and utilities.

Example usage:

 reporting { baseDir "$buildDir/our-reports" } 

When implementing a task that produces reports, the location of where to generate reports should be obtained via the #file(String) method of this extension.

org.gradle.nativeplatform.Repositories

The repositories that Gradle will search for prebuilt libraries.

org.gradle.api.artifacts.dsl.RepositoryHandler (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.artifacts.dsl.RepositoryHandler

A RepositoryHandler manages a set of repositories, allowing repositories to be defined and queried.

org.gradle.api.artifacts.repositories.RepositoryLayout

Represents the directory structure for a repository. For examples see the reference for org.gradle.api.artifacts.repositories.IvyArtifactRepository#layout(String, org.gradle.api.Action)

org.gradle.api.artifacts.repositories.RepositoryResourceAccessor

Provides access to resources on an artifact repository. Gradle takes care of caching the resources locally. The scope of the cache may depend on the accessor: users should refer to the javadocs of the methods providing an accessor to determine the scope.

org.gradle.api.file.ReproducibleFileVisitor

Visitor which can request a reproducible file order.

org.gradle.api.artifacts.result.ResolutionResult

Contains the information about the result of dependency resolution. You can use this type to determine all the component instances that are included in the resolved dependency graph, and the dependencies between them.

org.gradle.api.artifacts.ResolutionStrategy

Defines the strategies around dependency resolution. For example, forcing certain dependency versions, substitutions, conflict resolutions or snapshot timeouts.

Examples:

 apply plugin: 'java' //so that there are some configurations configurations.all { resolutionStrategy { // fail eagerly on version conflict (includes transitive dependencies) // e.g. multiple different versions of the same dependency (group and name are equal) failOnVersionConflict() // prefer modules that are part of this build (multi-project or composite build) over external modules preferProjectModules() // force certain versions of dependencies (including transitive) // *append new forced modules: force 'asm:asm-all:3.3.1', 'commons-io:commons-io:1.4' // *replace existing forced modules with new ones: forcedModules = ['asm:asm-all:3.3.1'] // add dependency substitution rules dependencySubstitution { substitute module('org.gradle:api') with project(':api') substitute project(':util') with module('org.gradle:util:3.0') } // cache dynamic versions for 10 minutes cacheDynamicVersionsFor 10*60, 'seconds' // don't cache changing modules at all cacheChangingModulesFor 0, 'seconds' } } 

org.gradle.api.artifacts.ResolvableDependencies

A set of Dependency objects which can be resolved to a set of files. There are various methods on this type that you can use to get the result in different forms:

  • #getFiles() returns a FileCollection that provides the result as a set of java.io.File instances.
  • #getResolutionResult() returns a ResolutionResult that provides information about the dependency graph.
  • #getArtifacts() returns an ArtifactCollection that provides the files with additional metadata.

The dependencies are resolved once only, when the result is first requested. The result is reused and returned for subsequent calls. Once resolved, any mutation to the dependencies will result in an error.

org.gradle.api.artifacts.ResolveException

A ResolveException is thrown when dependency resolution fails for some reason.

org.gradle.api.artifacts.ResolvedArtifact

Information about a resolved artifact.

org.gradle.api.artifacts.result.ResolvedArtifactResult

The result of successfully resolving an artifact.

org.gradle.api.artifacts.result.ResolvedComponentResult

Represents a component instance in the resolved dependency graph. Provides some basic identity and dependency information about the component.

org.gradle.api.artifacts.ResolvedConfiguration

A ResolvedConfiguration represents the result of resolving a Configuration, and provides access to both the artifacts and the meta-data of the result.

org.gradle.api.artifacts.ResolvedDependency

Information about a resolved dependency.

org.gradle.api.artifacts.result.ResolvedDependencyResult

A dependency that was resolved successfully.

org.gradle.api.artifacts.ResolvedModuleVersion

Represents meta-data about a resolved module version.

org.gradle.api.artifacts.result.ResolvedVariantResult

The result of successfully resolving a component variant.

org.gradle.api.resources.Resource

A generic resource of some kind. Only describes the resource. There are more specific interface that extend this one and specify ways of accessing the resource's content.

org.gradle.api.resources.ResourceException

Generic resource exception that all other resource-related exceptions inherit from.

org.gradle.plugins.ide.eclipse.model.ResourceFilter

The gradle DSL model of an Eclipse resource filter. This allows specifying a filter with a custom matcher and configuring whether it is an include/exclude filter that applies to files, folders, or both. The following example excludes the 'node_modules' folder.

 apply plugin: 'java' apply plugin: 'eclipse' eclipse { project { resourceFilter { appliesTo = 'FOLDERS' type = 'EXCLUDE_ALL' matcher { id = 'org.eclipse.ui.ide.multiFilter' // to find out which arguments to use, configure the desired // filter with Eclipse's UI and copy the arguments string over arguments = '1.0-name-matches-false-false-node_modules' } } } } 

org.gradle.plugins.ide.eclipse.model.ResourceFilterAppliesTo

Specifies the type of resource that the Eclipse ResourceFilter applies to.

org.gradle.plugins.ide.eclipse.model.ResourceFilterMatcher

The model of an Eclipse resource filter matcher.

The matcher decides when the containing filter (or containing matcher) applies. The matcher configures things like whether this ResourceFilter matches resources by name, project relative path, location, last modified, etc. Eclipse has many types of built-in matchers and it is possible to specify the id and arguments for custom matchers using this model.

A matcher must have an id. It may have either a custom string argument or a set of nested child matchers (e.g. an 'or' matcher will have several nested condition matchers).

For more documentation on usage with examples, see ResourceFilter.

org.gradle.plugins.ide.eclipse.model.ResourceFilterType

Specifies whether an Eclipse ResourceFilter is including or excluding resources.

org.gradle.api.resources.ResourceHandler

Provides access to resource-specific utility methods, for example factory methods that create various resources.

org.gradle.tooling.ResultHandler

A handler for an asynchronous operation which returns an object of type T.

org.gradle.plugins.javascript.rhino.RhinoExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.javascript.rhino.RhinoExtension
org.gradle.plugins.javascript.rhino.RhinoPlugin
org.gradle.plugins.javascript.rhino.RhinoShellExec
org.gradle.play.tasks.RoutesCompile

Task for compiling routes templates into Scala code.

This task is usually created as one of the build tasks when building a Play application with the org.gradle.play.plugins.PlayPlugin plugin. Explicit configuration of this task is not expected and should be performed on the equivalent settings at the org.gradle.play.PlayApplicationSpec level.

org.gradle.language.routes.RoutesSourceSet

Represents a source set containing routes files

org.gradle.api.Rule

A Rule represents some action to perform when an unknown domain object is referenced. The rule can use the domain object name to add an implicit domain object.

org.gradle.model.RuleInput

Attached to the getter for a property on a RuleSource to denote that the property defines an implicit input for all rules defined by the rule source.

org.gradle.model.RuleSource

A marker type for a class that is a collection of rules.

A rule source is not used like a regular Java object. It is a stateless container of methods and possibly constants.

Please consult the “Rule based model configuration” chapter of the Gradle User Guide for general information about “rules”.

Rule methods

Each method that is annotated with one of the following is considered a rule:

  • Model
  • Defaults
  • Mutate
  • Finalize
  • Validate
  • Rules
  • org.gradle.platform.base.ComponentType
  • org.gradle.platform.base.ComponentBinaries
  • org.gradle.platform.base.BinaryTasks

Each annotation specifies the type of the rule, which affects when it will be executed.

The following constraints apply to all rule methods:

  • A method may only be annotated by at most one of the above annotations.
  • A rule method may be static or not; it makes no difference.
  • A rule method cannot be generic (i.e. cannot have type parameters).
  • With the exception of Model methods, all methods must have at least one parameter.
  • With the exception of Model methods, all methods must have a void return type.

See Model for information on the significance of the return type of a Model method.

Subjects and inputs

Method rules declare the subject and any inputs as parameters to the method. With the exception of Model methods, the subject of the rule is the, required, first parameter and all subsequent parameters are inputs. For a non-void Model method, the subject (i.e. model element being created) is the return object. For a void Model method, the subject is the first method parameter.

The Path annotation can be placed on any parameter (except the subject of Model rules) to indicate the model element to bind to. If there is no Path annotation, a “by-type” binding will be attempted. The binding scope is determined by how the rule source is applied.

General class constraints

Along with the constraints on individual rule methods by their associated annotation, the following are general constraints of rule source implementations:

  • Constructors are not allowed.
  • Inheritance hierarchies are not allowed (i.e. all rules sources must directly extend RuleSource).
  • Instance variables are not allowed.
  • Non-final static variables are not allowed (i.e. constants are allowed).
  • Methods cannot be overloaded.
  • Implementations cannot be generic (i.e. cannot use type parameters).

org.gradle.model.RuleTarget

Attached to the getter for a property on a RuleSource to denote that the property defines the target for the rule source.

org.gradle.model.Rules

Denotes that the RuleSource method rule carrying this annotation defines additional rules based on its inputs.

org.gradle.nativeplatform.test.tasks.RunTestExecutable

Runs a compiled and installed test executable.

org.gradle.normalization.RuntimeClasspathNormalization

Configuration of runtime classpath normalization.

org.gradle.api.plugins.scala.ScalaBasePlugin

A Plugin which compiles and tests Scala sources.

org.gradle.api.tasks.scala.ScalaCompile

Compiles Scala source files, and optionally, Java source files.

org.gradle.api.tasks.scala.ScalaCompileOptions

Options for Scala Compilation.

org.gradle.api.tasks.scala.ScalaDoc

Generates HTML API documentation for Scala source files.

org.gradle.api.tasks.scala.ScalaDocOptions

Options for the ScalaDoc tool.

org.gradle.api.tasks.scala.ScalaForkOptions

Fork options for Scala compilation. Only take effect if BaseScalaCompileOptions.fork is true.

org.gradle.language.scala.plugins.ScalaLanguagePlugin

Plugin for compiling Scala code. Applies the org.gradle.language.base.plugins.ComponentModelBasePlugin and org.gradle.language.jvm.plugins.JvmResourcesPlugin. Registers "scala" language support with the org.gradle.language.scala.ScalaLanguageSourceSet.

org.gradle.language.scala.ScalaLanguageSourceSet

A set of sources passed to the Scala compiler.

org.gradle.language.scala.ScalaPlatform

Defines and configures a Scala Platform.

org.gradle.api.plugins.scala.ScalaPlugin

A Plugin which sets up a Scala project.

org.gradle.api.tasks.ScalaRuntime (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.tasks.ScalaRuntime

Provides information related to the Scala runtime(s) used in a project. Added by the org.gradle.api.plugins.scala.ScalaBasePlugin as a project extension named scalaRuntime.

Example usage:

 apply plugin: "scala" repositories { mavenCentral() } dependencies { compile "org.scala-lang:scala-library:2.10.1" } def scalaClasspath = scalaRuntime.inferScalaClasspath(configurations.compile) // The returned class path can be used to configure the 'scalaClasspath' property of tasks // such as 'ScalaCompile' or 'ScalaDoc', or to execute these and other Scala tools directly. 

org.gradle.api.tasks.ScalaSourceSet

A ScalaSourceSetConvention defines the properties and methods added to a by the ScalaPlugin.

org.gradle.language.scala.toolchain.ScalaToolChain

A set of tools for building Scala applications

org.gradle.api.Script

This interface is implemented by all Gradle scripts to add in some Gradle-specific methods. As your compiled script class will implement this interface, you can use the methods and properties declared by this interface directly in your script.

Generally, a Script object will have a delegate object attached to it. For example, a build script will have a Project instance attached to it, and an initialization script will have a instance attached to it. Any property reference or method call which is not found on this Script object is forwarded to the delegate object.

org.gradle.jvm.application.scripts.ScriptGenerator

Generates a script to start a JVM application.

org.gradle.api.initialization.dsl.ScriptHandler (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.initialization.dsl.ScriptHandler

A ScriptHandler allows you to manage the compilation and execution of a build script. You can declare the classpath used to compile and execute a build script. This classpath is also used to load the plugins which the build script uses.

You can obtain a ScriptHandler instance using org.gradle.api.Project#getBuildscript() or .

To declare the script classpath, you use the org.gradle.api.artifacts.dsl.DependencyHandler provided by #getDependencies() to attach dependencies to the {@value #CLASSPATH_CONFIGURATION} configuration. These dependencies are resolved just prior to script compilation, and assembled into the classpath for the script.

For most external dependencies you will also need to declare one or more repositories where the dependencies can be found, using the org.gradle.api.artifacts.dsl.RepositoryHandler provided by .

org.gradle.kotlin.dsl.ScriptHandlerScope

Receiver for the buildscript block.

org.gradle.api.artifacts.SelfResolvingDependency

A SelfResolvingDependency is a Dependency which is able to resolve itself, independent of a repository.

org.gradle.api.provider.SetProperty

Represents a property whose type is a Set of elements of type T. Retains iteration order.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory method org.gradle.api.model.ObjectFactory#setProperty(Class).

org.gradle.api.initialization.Settings (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.initialization.Settings

Declares the configuration required to instantiate and configure the hierarchy of instances which are to participate in a build.

There is a one-to-one correspondence between a Settings instance and a {@value * #DEFAULT_SETTINGS_FILE} settings file. Before Gradle assembles the projects for a build, it creates a Settings instance and executes the settings file against it.

Assembling a Multi-Project Build

One of the purposes of the Settings object is to allow you to declare the projects which are to be included in the build. You add projects to the build using the #include(String...) method. There is always a root project included in a build. It is added automatically when the Settings object is created. The root project's name defaults to the name of the directory containing the settings file. The root project's project directory defaults to the directory containing the settings file.

When a project is included in the build, a ProjectDescriptor is created. You can use this descriptor to change the default values for several properties of the project.

Using Settings in a Settings File Dynamic Properties

In addition to the properties of this interface, the Settings object makes some additional read-only properties available to the settings script. This includes properties from the following sources:

  • Defined in the {@value org.gradle.api.Project#GRADLE_PROPERTIES} file located in the settings directory of the build.
  • Defined the {@value org.gradle.api.Project#GRADLE_PROPERTIES} file located in the user's .gradle directory.
  • Provided on the command-line using the -P option.

org.gradle.kotlin.dsl.SettingsScriptApi

Standard implementation of the API exposed to all types of Settings scripts, precompiled and otherwise.

org.gradle.nativeplatform.SharedLibraryBinary

A NativeLibrary that has been compiled and linked as a shared library.

org.gradle.nativeplatform.SharedLibraryBinarySpec

A shared library binary built by Gradle for a native library.

org.gradle.api.logging.configuration.ShowStacktrace

Specifies the detail to include in stacktraces.

org.gradle.plugins.signing.Sign

A task for creating digital signature files for one or more; tasks, files, publishable artifacts or configurations.

The task produces Signature

objects that are publishable artifacts and can be assigned to another configuration.

The signature objects are created with defaults and using this tasks signatory and signature type.

org.gradle.plugins.signing.SignOperation

A sign operation creates digital signatures for one or more files or PublishArtifact.

The external representation of the signature is specified by the signature type property, while the #signatory property specifies who is to sign.

A sign operation manages one or more Signature objects. The sign methods are used to register things to generate signatures for. The #execute() method generates the signatures for all of the registered items at that time.

org.gradle.plugins.signing.signatory.Signatory

A signatory is an object capable of providing a signature for an arbitrary stream of bytes.

org.gradle.plugins.signing.signatory.SignatoryProvider

Provides implementations of signatory implementations for a project.

org.gradle.plugins.signing.signatory.SignatorySupport

Convenience base class for Signatory implementations.

org.gradle.plugins.signing.Signature

A digital signature file artifact.

A signature file is always generated from another file, which may be a PublishArtifact.

org.gradle.plugins.signing.SignatureSpec

Specifies how objects will be signed.

org.gradle.plugins.signing.type.SignatureType

The type of signature.

org.gradle.plugins.signing.type.SignatureTypeProvider

Provider of SignatureType.

org.gradle.plugins.signing.SigningExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.plugins.signing.SigningExtension

The global signing configuration for a project.

org.gradle.plugins.signing.SigningPlugin

Adds the ability to digitally sign files and artifacts.

org.gradle.plugins.javascript.envjs.http.simple.SimpleHttpFileServer
org.gradle.plugins.javascript.envjs.http.simple.SimpleHttpFileServerFactory
org.gradle.plugins.ide.idea.model.SingleEntryModuleLibrary

Single entry module library

org.gradle.api.reporting.SingleFileReport

A report that is a single file.

org.gradle.api.tasks.SkipWhenEmpty

Attached to a task property to indicate that the task should be skipped when the value of the property is an empty org.gradle.api.file.FileCollection or directory.

If all of the inputs declared with this annotation are empty, the task will be skipped with a "NO-SOURCE" message.

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

  • org.gradle.api.tasks.InputFiles
  • org.gradle.api.tasks.InputDirectory

org.gradle.tooling.events.SkippedResult

Describes how an operation was skipped.

org.gradle.api.component.SoftwareComponent

A software component produced by a Gradle software project.

An implementation of this interface may also implement:

  • ComponentWithVariants to provide information about the variants that the component provides.

org.gradle.api.component.SoftwareComponentContainer

A Container that contains all of the Software Components produced by a Project.

org.gradle.platform.base.SourceComponentSpec

Represents some component whose implementation can be represented as a collection of source files, and whose other outputs are built from this source.

org.gradle.vcs.SourceControl

Configuration related to source dependencies.

org.gradle.tooling.model.SourceDirectory

Represents a source directory.

org.gradle.api.file.SourceDirectorySet

A SourceDirectorySet represents a set of source files composed from a set of source directories, along with associated include and exclude patterns.

SourceDirectorySet extends FileTree. The contents of the file tree represent the source files of this set, arranged in a hierarchy. The file tree is live and reflects changes to the source directories and their contents.

org.gradle.plugins.ide.eclipse.model.SourceFolder

SourceFolder.path contains only project relative path.

org.gradle.api.tasks.SourceSet (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.tasks.SourceSet

A SourceSet represents a logical group of Java source and resources.

See the example below how SourceSet 'main' is accessed and how the SourceDirectorySet 'java' is configured to exclude some package from compilation.

 apply plugin: 'java' sourceSets { main { java { exclude 'some/unwanted/package/**' } } } 

org.gradle.api.tasks.SourceSetContainer

A SourceSetContainer manages a set of SourceSet objects.

org.gradle.api.tasks.SourceSetOutput

A collection of all output directories (compiled classes, processed resources, etc.) - notice that SourceSetOutput extends FileCollection.

Provides output information of the source set. Allows configuring the default output dirs and specify additional output dirs.

 apply plugin: 'java' sourceSets { main { //if you truly want to override the defaults: output.resourcesDir = file('out/bin') // Compiled Java classes should use this directory java.outputDir = file('out/bin') } } 
Working with generated resources.

In general, we recommend generating resources into folders different than the regular resourcesDir and classesDir. Usually, it makes the build easier to understand and maintain. Also it gives some additional benefits because other Gradle plugins can take advantage of the output dirs 'registered' in the SourceSet.output. For example: Java plugin will use those dirs in calculating class paths and for jarring the content; IDEA and Eclipse plugins will put those folders on relevant classpath.

An example how to work with generated resources:

 apply plugin: 'java' def generatedResources = "$buildDir/generated-resources/main" sourceSets { main { //let's register an output folder on the main SourceSet: output.dir(generatedResources, builtBy: 'generateMyResources') //it is now a part of the 'main' classpath and will be a part of the jar } } //a task that generates the resources: task generateMyResources { doLast { def generated = new File(generatedResources, "myGeneratedResource.properties") generated.text = "message=Stay happy!" } } //Java plugin task 'classes' and 'testClasses' will automatically depend on relevant tasks registered with 'builtBy' //Eclipse/IDEA plugins will automatically depend on 'generateMyResources' //because the output dir was registered with 'builtBy' information apply plugin: 'idea'; apply plugin: 'eclipse' 
Find more information in #dir(java.util.Map, Object) and #getDirs()

org.gradle.api.tasks.SourceTask

A SourceTask performs some operation on source files.

org.gradle.plugins.javascript.base.SourceTransformationException

Thrown when a source code transformation fails.

org.gradle.language.base.artifact.SourcesArtifact

An artifact containing sources for a software component.

org.gradle.api.specs.Spec (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.specs.Spec

Represents some predicate against objects of type T.

org.gradle.api.specs.Specs

Provides a number of org.gradle.api.specs.Spec implementations.

org.gradle.external.javadoc.StandardJavadocDocletOptions

Provides the options for the standard Javadoc doclet.

org.gradle.api.logging.StandardOutputListener

A StandardOutputListener receives text written by Gradle's logging system to standard output or error.

org.gradle.tooling.events.StartEvent

An event that informs about an operation having started its execution.

org.gradle.StartParameter

StartParameter defines the configuration used by a Gradle instance to execute a build. The properties of StartParameter generally correspond to the command-line options of Gradle.

You can obtain an instance of a StartParameter by either creating a new one, or duplicating an existing one using #newInstance or #newBuild.

org.gradle.nativeplatform.StaticLibraryBinary

A NativeLibrary that has been compiled and archived into a static library.

org.gradle.nativeplatform.StaticLibraryBinarySpec

A static library binary built by Gradle for a native library.

org.gradle.tooling.events.StatusEvent

An event that informs about an interim results of the operation.

org.gradle.api.tasks.StopActionException

A StopActionException is be thrown by a task org.gradle.api.Action or task action closure to stop its own execution and to start execution of the task's next action. An action can usually be stopped by just calling return inside the action closure. But if the action works with helper methods that can lead to redundant code. For example:

 List existentSourceDirs = HelperUtil.getExistentSourceDirs() if (!existentSourceDirs) {return} 

If the getExistentSourceDirs() throws a StopActionException instead, the tasks does not need the if statement.

Note that throwing this exception does not fail the execution of the task or the build.

org.gradle.api.tasks.StopExecutionException

A StopExecutionException is thrown by a org.gradle.api.Action or task action closure to stop execution of the current task and start execution of the next task. This allows, for example, precondition actions to be added to a task which abort execution of the task if the preconditions are not met.

Note that throwing this exception does not fail the execution of the task or the build.

org.gradle.nativeplatform.tasks.StripSymbols

Strips the debug symbols from a binary

org.gradle.tooling.events.SuccessResult

Describes how an operation finished successfully.

org.gradle.language.swift.SwiftApplication

Configuration for a Swift application, defining the source files that make up the application plus other settings.

An instance of this type is added as a project extension by the Swift application plugin.

org.gradle.language.swift.plugins.SwiftApplicationPlugin

A plugin that produces an executable from Swift source.

Adds compile, link and install tasks to build the executable. Defaults to looking for source files in `src/main/swift`.

Adds a SwiftApplication extension to the project to allow configuration of the executable.

org.gradle.language.swift.plugins.SwiftBasePlugin

A common base plugin for the Swift application and library plugins

org.gradle.language.swift.SwiftBinary

A binary built from Swift source and linked from the resulting object files.

org.gradle.language.swift.tasks.SwiftCompile

Compiles Swift source files into object files.

org.gradle.nativeplatform.toolchain.plugins.SwiftCompilerPlugin

A Plugin which makes the Swiftc compiler available for compiling Swift code.

org.gradle.language.swift.SwiftComponent

Configuration for a Swift component, such as a library or executable, defining the source files that make up the component plus other settings.

Swift component is composed of some Swift source files that are compiled and then linked into some binary.

An instance of this type is added as a project extension by the Swift plugins.

org.gradle.language.swift.SwiftExecutable

An executable built from Swift source.

org.gradle.language.swift.SwiftLibrary

Configuration for a Swift library, defining the source files that make up the library plus other settings.

An instance of this type is added as a project extension by the Swift library plugin.

org.gradle.language.swift.plugins.SwiftLibraryPlugin

A plugin that produces a shared library from Swift source.

Adds compile, link and install tasks to build the shared library. Defaults to looking for source files in `src/main/swift`.

Adds a SwiftComponent extension to the project to allow configuration of the library.

org.gradle.swiftpm.plugins.SwiftPackageManagerExportPlugin

A plugin that produces a Swift Package Manager manifests from the Gradle model.

This plugin should only be applied to the root project of a build.

org.gradle.language.swift.SwiftPlatform

A target platform for building Swift binaries.

org.gradle.language.swift.SwiftSharedLibrary

A shared library built from Swift source.

org.gradle.language.swift.SwiftStaticLibrary

A static library built from Swift source.

org.gradle.language.swift.SwiftVersion

Swift version.

org.gradle.nativeplatform.test.xctest.SwiftXCTestBinary

An test binary built from Swift source.

org.gradle.nativeplatform.test.xctest.SwiftXCTestBundle

An XCTest executable for tests implemented in Swift.

org.gradle.nativeplatform.test.xctest.SwiftXCTestExecutable

An XCTest executable for tests implemented in Swift.

org.gradle.nativeplatform.test.xctest.SwiftXCTestSuite

A XCTest suite, implemented in Swift.

org.gradle.nativeplatform.toolchain.Swiftc

The Swift Compiler tool chain.

org.gradle.nativeplatform.toolchain.SwiftcPlatformToolChain

Swiftc specific settings for the tools used to build for a particular platform.

org.gradle.api.tasks.Sync

Synchronizes the contents of a destination directory with some source directories and files.

This task is like the Copy task, except the destination directory will only contain the files copied. All files that exist in the destination directory will be deleted before copying files, unless a #preserve(Action) is specified.

Examples:

 // Sync can be used like a Copy task // See the Copy documentation for more examples task syncDependencies(type: Sync) { from 'my/shared/dependencyDir' into 'build/deps/compile' } // You can preserve output that already exists in the // destination directory. Files matching the preserve // filter will not be deleted. task sync(type: Sync) { from 'source' into 'dest' preserve { include 'extraDir/**' include 'dir1/**' exclude 'dir1/extra.txt' } } 

org.gradle.api.tasks.bundling.Tar

Assembles a TAR archive.

org.gradle.api.plugins.quality.TargetJdk

Represents the PMD targetjdk property available for PMD < 5.0

org.gradle.nativeplatform.TargetedNativeComponent

A native component that can be configured to target certain variant dimensions. This functionality is a temporary workaround to eliminate configuration of unnecessary domain objects and tasks.

org.gradle.tooling.model.Task

Represents a task which is executable by Gradle.

Note: Task extends Launchable since 1.12.

org.gradle.api.Task

A Task represents a single atomic piece of work for a build, such as compiling classes or generating javadoc.

Each task belongs to a Project. You can use the various methods on to create and lookup task instances. For example, creates an empty task with the given name. You can also use the task keyword in your build file:

 task myTask task myTask { configure closure } task myTask(type: SomeType) task myTask(type: SomeType) { configure closure } 

Each task has a name, which can be used to refer to the task within its owning project, and a fully qualified path, which is unique across all tasks in all projects. The path is the concatenation of the owning project's path and the task's name. Path elements are separated using the {@value org.gradle.api.Project#PATH_SEPARATOR} character.

Task Actions

A Task is made up of a sequence of Action objects. When the task is executed, each of the actions is executed in turn, by calling Action#execute. You can add actions to a task by calling or #doLast(Action).

Groovy closures can also be used to provide a task action. When the action is executed, the closure is called with the task as parameter. You can add action closures to a task by calling #doFirst(groovy.lang.Closure) or #doLast(groovy.lang.Closure).

There are 2 special exceptions which a task action can throw to abort execution and continue without failing the build. A task action can abort execution of the action and continue to the next action of the task by throwing a org.gradle.api.tasks.StopActionException. A task action can abort execution of the task and continue to the next task by throwing a org.gradle.api.tasks.StopExecutionException. Using these exceptions allows you to have precondition actions which skip execution of the task, or part of the task, if not true.

Task Dependencies and Task Ordering

A task may have dependencies on other tasks or might be scheduled to always run after another task. Gradle ensures that all task dependencies and ordering rules are honored when executing tasks, so that the task is executed after all of its dependencies and any "must run after" tasks have been executed.

Dependencies to a task are controlled using #dependsOn(Object...) or #setDependsOn(Iterable), and #mustRunAfter(Object...), #setMustRunAfter(Iterable), #shouldRunAfter(Object...) and #setShouldRunAfter(Iterable) are used to specify ordering between tasks. You can use objects of any of the following types to specify dependencies and ordering:

  • A String, CharSequence or groovy.lang.GString task path or name. A relative path is interpreted relative to the task's Project. This allows you to refer to tasks in other projects.
  • A Task.
  • A closure. The closure may take a Task as parameter. It may return any of the types listed here. Its return value is recursively converted to tasks. A null return value is treated as an empty collection.
  • A TaskDependency object.
  • A Buildable object.
  • A org.gradle.api.file.RegularFileProperty or org.gradle.api.file.DirectoryProperty.
  • A Iterable, Collection, Map or array. May contain any of the types listed here. The elements of the iterable/collection/map/array are recursively converted to tasks.
  • A Callable. The call() method may return any of the types listed here. Its return value is recursively converted to tasks. A null return value is treated as an empty collection.
Using a Task in a Build File Dynamic Properties

A Task has 4 'scopes' for properties. You can access these properties by name from the build file or by calling the #property(String) method. You can change the value of these properties by calling the #setProperty(String, Object) method.

  • The Task object itself. This includes any property getters and setters declared by the Task implementation class. The properties of this scope are readable or writable based on the presence of the corresponding getter and setter methods.
  • The extensions added to the task by plugins. Each extension is available as a read-only property with the same name as the extension.
  • The convention properties added to the task by plugins. A plugin can add properties and methods to a task through the task's Convention object. The properties of this scope may be readable or writable, depending on the convention objects.
  • The extra properties of the task. Each task object maintains a map of additional properties. These are arbitrary name -> value pairs which you can use to dynamically add properties to a task object. Once defined, the properties of this scope are readable and writable.
Dynamic Methods

A Plugin may add methods to a Task using its Convention object.

Parallel Execution

By default, tasks are not executed in parallel unless a task is waiting on asynchronous work and another task (which is not dependent) is ready to execute. Parallel execution can be enabled by the --parallel flag when the build is initiated. In parallel mode, the tasks of different projects (i.e. in a multi project build) are able to be executed in parallel.

org.gradle.api.tasks.TaskAction

Marks a method as the action to run when the task is executed.

org.gradle.api.execution.TaskActionListener

A TaskActionListener is notified of the actions that a task performs.

org.gradle.api.tasks.TaskCollection

A TaskCollection contains a set of Task instances, and provides a number of query methods.

org.gradle.api.tasks.TaskContainer (extensions in package org.gradle.kotlin.dsl)
org.gradle.api.tasks.TaskContainer

A TaskContainer is responsible for managing a set of Task instances.

You can obtain a TaskContainer instance by calling org.gradle.api.Project#getTasks(), or using the tasks property in your build script.

org.gradle.api.tasks.TaskDependency

A TaskDependency represents an unordered set of tasks which a Task depends on. Gradle ensures that all the dependencies of a task are executed before the task itself is executed.

You can add a TaskDependency to a task by calling the task's Task#dependsOn(Object...) method.

org.gradle.api.tasks.TaskDestroyables

Represents the files or directories that a org.gradle.api.Task destroys (removes).

org.gradle.api.execution.TaskExecutionAdapter

A TaskExecutionListener adapter class for receiving task execution events. The methods in this class are empty. This class exists as convenience for creating listener objects.

org.gradle.api.tasks.TaskExecutionException

A TaskExecutionException is thrown when a task fails to execute successfully.

org.gradle.api.execution.TaskExecutionGraph

A TaskExecutionGraph is responsible for managing the execution of the Task instances which are part of the build. The TaskExecutionGraph maintains an execution plan of tasks to be executed (or which have been executed), and you can query this plan from your build file.

You can access the TaskExecutionGraph by calling org.gradle.api.invocation.Gradle#getTaskGraph(). In your build file you can use gradle.taskGraph to access it.

The TaskExecutionGraph is populated only after all the projects in the build have been evaulated. It is empty before then. You can receive a notification when the graph is populated, using or #addTaskExecutionGraphListener(TaskExecutionGraphListener).

org.gradle.api.execution.TaskExecutionGraphListener

A TaskExecutionGraphListener is notified when the TaskExecutionGraph has been populated. You can use this interface in your build file to perform some action based on the contents of the graph, before any tasks are actually executed.

org.gradle.api.execution.TaskExecutionListener

A TaskExecutionListener is notified of the execution of the tasks in a build.

You can add a TaskExecutionListener to a build using org.gradle.api.execution.TaskExecutionGraph#addTaskExecutionListener

org.gradle.TaskExecutionRequest

A request to execute some tasks, along with an optional project path context to provide information necessary to select the tasks

org.gradle.tooling.events.task.TaskFailureResult

Describes how a task operation finished with failures.

org.gradle.api.tasks.TaskFilePropertyBuilder

Describes a property of a task that contains zero or more files.

org.gradle.tooling.events.task.TaskFinishEvent

An event that informs about a task having finished its execution. You can query the result of the task using #getResult().

org.gradle.api.tasks.TaskInputFilePropertyBuilder

Describes an input property of a task that contains zero or more files.

org.gradle.api.tasks.TaskInputPropertyBuilder

Describes an input property of a task.

org.gradle.api.tasks.TaskInputs

A TaskInputs represents the inputs for a task.

You can obtain a TaskInputs instance using org.gradle.api.Task#getInputs().

org.gradle.api.tasks.TaskInstantiationException

A TaskInstantiationException is thrown when a task cannot be instantiated for some reason.

org.gradle.api.tasks.TaskLocalState

Represents the files or directories that represent the local state of a org.gradle.api.Task. The typical usage for local state is to store non-relocatable incremental analysis between builds. Local state is removed whenever the task is loaded from cache.

org.gradle.tooling.events.task.TaskOperationDescriptor

Describes a task operation for which an event has occurred.

org.gradle.tooling.events.task.TaskOperationResult

Describes the result of running a task operation.

org.gradle.testkit.runner.TaskOutcome

The outcome of executing a task during a build.

org.gradle.api.tasks.TaskOutputFilePropertyBuilder

Describes an output property of a task that contains zero or more files.

org.gradle.api.tasks.TaskOutputs

A TaskOutputs represents the outputs of a task.

You can obtain a TaskOutputs instance using org.gradle.api.Task#getOutputs().

org.gradle.tooling.events.task.TaskProgressEvent

Root interface for all events that signal progress while executing a task.

org.gradle.api.tasks.TaskPropertyBuilder

Describes a property of a task.

org.gradle.api.tasks.TaskProvider

Providers a task of the given type.

org.gradle.api.tasks.TaskReference

A lightweight reference to a task.

org.gradle.api.tasks.diagnostics.TaskReportTask

Displays a list of tasks in the project. An instance of this type is used when you execute the tasks task from the command-line.

By default, this report shows only those tasks which have been assigned to a task group, so-called visible tasks. Tasks which have not been assigned to a task group, so-called hidden tasks, can be included in the report by enabling the command line option --all.

org.gradle.tooling.model.TaskSelector

Represents a Launchable that uses task name to select tasks executed from a given project and its sub-projects. This is roughly equivalent to running `gradle <task-name>` from the command-line.

org.gradle.tooling.events.task.TaskSkippedResult

Describes how a task operation was skipped.

org.gradle.tooling.events.task.TaskStartEvent

An event that informs about a task having started its execution.

org.gradle.api.tasks.TaskState

TaskState provides information about the execution state of a org.gradle.api.Task. You can obtain a TaskState instance by calling org.gradle.api.Task#getState().

org.gradle.tooling.events.task.TaskSuccessResult

Describes how a task operation finished successfully.

org.gradle.api.tasks.TaskValidationException

A TaskValidationException is thrown when there is some validation problem with a task.

org.gradle.jvm.application.scripts.TemplateBasedScriptGenerator

Interface for generating scripts with the provided details based on a provided template.

org.gradle.api.tasks.testing.Test

Executes JUnit (3.8.x, 4.x or 5.x) or TestNG tests. Test are always run in (one or more) separate JVMs. The sample below shows various configuration options.

 apply plugin: 'java' // adds 'test' task test { // enable TestNG support (default is JUnit) useTestNG() // enable JUnit Platform (a.k.a. JUnit 5) support useJUnitPlatform() // set a system property for the test JVM(s) systemProperty 'some.prop', 'value' // explicitly include or exclude tests include 'org/foo/**' exclude 'org/boo/**' // show standard out and standard error of the test JVM(s) on the console testLogging.showStandardStreams = true // set heap size for the test JVM(s) minHeapSize = "128m" maxHeapSize = "512m" // set JVM arguments for the test JVM(s) jvmArgs '-XX:MaxPermSize=256m' // listen to events in the test execution lifecycle beforeTest { descriptor -> logger.lifecycle("Running test: " + descriptor) } // Fail the 'test' task on the first test failure failFast = true // listen to standard out and standard error of the test JVM(s) onOutput { descriptor, event -> logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message ) } } 

The test process can be started in debug mode (see #getDebug()) in an ad-hoc manner by supplying the `--debug-jvm` switch when invoking the build.

 gradle someTestTask --debug-jvm 

org.gradle.nativeplatform.test.TestComponent

Represents a component that can run tests.

org.gradle.api.tasks.testing.TestDescriptor

Describes a test. A test may be a single atomic test, such as the execution of a test method, or it may be a composite test, made up of zero or more tests.

org.gradle.api.tasks.testing.logging.TestExceptionFormat

Determines how exceptions are formatted in test logging.

org.gradle.tooling.TestExecutionException

Thrown when the org.gradle.tooling.TestLauncher cannot run tests, or when one or more tests fail.

org.gradle.api.tasks.testing.TestExecutionException

A TestExecutionException is thrown when no tests can be found that match the specified test filters.

org.gradle.tooling.events.test.TestFailureResult

Describes how a test operation finished with failures.

org.gradle.api.tasks.testing.TestFilter

Allows filtering tests for execution. Some examples:

 apply plugin: 'java' test { filter { //specific test class, this can match 'SomeTest' class and corresponding method under any package includeTestsMatching "SomeTest" includeTestsMatching "SomeTest.someTestMethod*" //specific test class includeTestsMatching "org.gradle.SomeTest" //specific test class and method includeTestsMatching "org.gradle.SomeTest.someSpecificFeature" includeTest "org.gradle.SomeTest", "someTestMethod" //specific test method, use wildcard includeTestsMatching "*SomeTest.someSpecificFeature" //specific test class, wildcard for packages includeTestsMatching "*.SomeTest" //all classes in package, recursively includeTestsMatching "com.gradle.tooling.*" //all integration tests, by naming convention includeTestsMatching "*IntegTest" //only ui tests from integration tests, by some naming convention includeTestsMatching "*IntegTest*ui" } } 

org.gradle.tooling.events.test.TestFinishEvent

An event that informs about a test having finished its execution. You can query the result of the test using #getResult().

org.gradle.api.tasks.testing.TestFrameworkOptions

The base class for any test framework specific options.

org.gradle.tooling.TestLauncher

A TestLauncher allows you to execute tests in a Gradle build.

org.gradle.api.tasks.testing.TestListener

Interface for listening to test execution. The intent is to be framework agnostic. Currently this interface can support feedback from JUnit and TestNG tests.

org.gradle.api.tasks.testing.logging.TestLogEvent

Test events that can be logged.

org.gradle.api.tasks.testing.logging.TestLogging

Options that determine which test events get logged, and at which detail.

org.gradle.api.tasks.testing.logging.TestLoggingContainer

Container for all test logging related options. Different options can be set for each log level. Options that are set directly (without specifying a log level) apply to log level LIFECYCLE. Example:

 apply plugin: 'java' test { testLogging { // set options for log level LIFECYCLE events "failed" exceptionFormat "short" // set options for log level DEBUG debug { events "started", "skipped", "failed" exceptionFormat "full" } // remove standard output/error logging from --info builds // by assigning only 'failed' and 'skipped' events info.events = ["failed", "skipped"] } } 
The defaults that are in place show progressively more information on log levels WARN, LIFECYCLE, INFO, and DEBUG, respectively.

org.gradle.api.tasks.testing.testng.TestNGOptions

The TestNG specific test options.

org.gradle.tooling.events.test.TestOperationDescriptor

Describes a test operation for which an event has occurred.

org.gradle.tooling.events.test.TestOperationResult

Describes the result of running a test operation.

org.gradle.api.tasks.testing.TestOutputEvent

Standard output or standard error message logged during the execution of the test

org.gradle.api.tasks.testing.TestOutputListener

Listens to the output events like printing to standard output or error

org.gradle.tooling.events.test.TestProgressEvent

Root interface for all events that signal progress while executing a test or test suite.

org.gradle.api.tasks.testing.TestReport

Generates an HTML test report from the results of one or more Test tasks.

org.gradle.api.tasks.testing.TestResult

Describes a test result.

org.gradle.tooling.events.test.TestSkippedResult

Describes how a test operation was skipped.

org.gradle.api.tasks.testing.logging.TestStackTraceFilter

Stack trace filters for test logging. Multiple filters can be combined.

org.gradle.tooling.events.test.TestStartEvent

An event that informs about a test having started its execution.

org.gradle.tooling.events.test.TestSuccessResult

Describes how a test operation finished successfully.

org.gradle.testing.base.TestSuiteBinarySpec

A binary which runs a suite of tests.

org.gradle.nativeplatform.test.TestSuiteComponent

Represents a component that defines a test suite.

org.gradle.testing.base.TestSuiteContainer

A container of TestSuiteSpec instances.

org.gradle.testing.base.TestSuiteSpec

A component representing a suite of tests that will be built and executed together.

org.gradle.testing.base.TestSuiteTaskCollection

Provides access to key tasks used by a test suite.

org.gradle.api.tasks.testing.TestTaskReports

The reports produced by the Test task.

org.gradle.testing.base.plugins.TestingBasePlugin

Base plugin for testing. - Adds default locations for test reporting

org.gradle.testing.base.plugins.TestingModelBasePlugin

Base plugin for testing. - Adds a org.gradle.testing.base.TestSuiteContainer named testSuites to the model. - Copies test binaries from testSuites into binaries.

org.gradle.ide.visualstudio.TextConfigFile

A plain text config file generated for Visual Studio.

org.gradle.ide.visualstudio.TextProvider

Provides access to the content of a generated text file.

org.gradle.api.resources.TextResource

A read-only body of text backed by a string, file, archive entry, or other source. To create a text resource, use one of the factory methods in TextResourceFactory (e.g. project.resources.text.fromFile(myFile)).

org.gradle.api.resources.TextResourceFactory

Creates TextResources backed by sources such as strings, files, and archive entries.

Example usages:

 def sourcedFromString = resources.text.fromString("some text content") def sourcedFromFile = resources.text.fromFile("path/to/file.txt") task someTask {} // assumption: produces a text file and declares it as output def sourcedFromTask = resources.text.fromFile(someTask) def sourcedFromArchiveEntry = resources.text.fromArchiveEntry("path/to/archive.zip", "path/to/archive/entry.txt") configurations { someConfig } // assumption: contains a single archive def sourcedFromConfiguration = resources.text.fromArchiveEntry(configurations.someConfig, "path/to/archive/entry.txt") def sourceFromUri = resources.text.fromUri("https://path/to/the/resource") 
File based factory methods optionally accept a character encoding. If no encoding is specified, the platform's default encoding is used.

org.gradle.nativeplatform.Tool

Configuration of the arguments of a ToolChain executable.

org.gradle.platform.base.ToolChain

A set of compilers that are used together to construct binaries.

org.gradle.platform.base.ToolChainRegistry

A Provider of ToolChains.

org.gradle.tooling.provider.model.ToolingModelBuilder

Responsible for building tooling models to return to the tooling API client.

The #buildAll(String, Project) method is called to create a model for a given project. The model is serialized to the client process and passed to the client application.

The model object is adapted to the Java type that is used by the client by generating a view, or wrapper object, over the model object. The model object does not need to implement the client Java type, but it does need to have the same structure as the client type. This means that the model object should have the same properties and methods as those defined on the client type. The tooling API deals with missing properties and methods, to allow evolution of the models. It will also adapt the values returned by the methods of the model object to the types used by the client.

Although it is not enforced, the model object should be immutable, as the tooling API will do some caching and other performance optimizations on the assumption that the model is effectively immutable. The tooling API does not make any guarantees about how the client application will use the model object.

org.gradle.tooling.provider.model.ToolingModelBuilderRegistry

A registry of tooling model builders. Adding a builder to this registry makes a model (or models) available via the tooling API.

org.gradle.platform.base.TransformationFileType

The type of a file of a transformation

org.gradle.api.Transformer

A Transformer transforms objects of type.

Implementations are free to return new objects or mutate the incoming value.

org.gradle.play.tasks.TwirlCompile

Task for compiling Twirl templates into Scala code.

org.gradle.language.twirl.TwirlImports

Represents the available sets of default imports that can be used when compiling Twirl templates.

org.gradle.language.twirl.TwirlSourceSet

Represents a source set containing twirl templates

 apply plugin: 'play' model { components { play { sources { withType(TwirlSourceSet) { // Use template format views.formats.csv.CsvFormat for all files named *.scala.csv // Additionally, include views.formats.csv._ package imports in generated sources. addUserTemplateFormat("csv", "views.formats.csv.CsvFormat", "views.formats.csv._") // Add these additional imports to all generated Scala code from Twirl templates additionalImports = [ 'my.pkg._', 'my.pkg.MyClass' ] } } } } } 

org.gradle.language.twirl.TwirlTemplateFormat

Twirl Template format mapping

org.gradle.platform.base.TypeBuilder

A TypeBuilder to configure the registration of a type.

org.gradle.api.reflect.TypeOf

Provides a way to preserve high-fidelity Type information on generic types. Capture a generic type with an anonymous subclass. For example:

new TypeOf<NamedDomainObjectContainer<ArtifactRepository>>() {}

org.gradle.api.file.UnableToDeleteFileException

Thrown by Gradle when it is unable to delete a file.

org.gradle.api.UncheckedIOException

UncheckedIOException is used to wrap an java.io.IOException into an unchecked exception.

org.gradle.testkit.runner.UnexpectedBuildFailure

Thrown when executing a build that was expected to succeed, but failed.

org.gradle.testkit.runner.UnexpectedBuildResultException

Base class for UnexpectedBuildFailure and UnexpectedBuildSuccess.

org.gradle.testkit.runner.UnexpectedBuildSuccess

Thrown when executing a build that was expected to fail, but succeeded.

org.gradle.language.swift.tasks.UnexportMainSymbol

Unexports the main entry point symbol in an object file, so the object file can be linked with an executable.

org.gradle.api.artifacts.UnknownConfigurationException

An UnknownConfigurationException is thrown when a configuration referenced by name cannot be found.

org.gradle.api.UnknownDomainObjectException

A UnknownDomainObjectException is the super class of all exceptions thrown when a given domain object cannot be located.

org.gradle.tooling.UnknownModelException

Thrown when the client is trying to acquire a model that is unknown to the Tooling API.

The exception extends UnsupportedVersionException only for backwards compatibility reasons.

org.gradle.tooling.provider.model.UnknownModelException

Thrown when an unknown tooling model is requested.

org.gradle.api.plugins.UnknownPluginException

A UnknownPluginException is thrown when an unknown plugin id is provided.

org.gradle.api.UnknownProjectException

An UnknownProjectException is thrown when a project referenced by path cannot be found.

org.gradle.api.artifacts.UnknownRepositoryException

An UnknownRepositoryException is thrown when a repository referenced by name cannot be found.

org.gradle.api.UnknownTaskException

An UnknownTaskException is thrown when a task referenced by path cannot be found.

org.gradle.model.Unmanaged

Indicates that a property of a managed model element is explicitly of an unmanaged type.

This annotation must be present on the getter of the property for the unmanaged type. If the annotation is not present for a property that is not a managed type, a fatal error will occur.

org.gradle.api.artifacts.result.UnresolvedArtifactResult

An artifact that could not be resolved.

org.gradle.api.artifacts.result.UnresolvedComponentResult

A component that could not be resolved.

org.gradle.api.artifacts.UnresolvedDependency

Unsuccessfully resolved dependency.

org.gradle.api.artifacts.result.UnresolvedDependencyResult

A dependency that could not be resolved.

org.gradle.tooling.exceptions.UnsupportedBuildArgumentException

Thrown when the org.gradle.tooling.LongRunningOperation has been configured with unsupported build arguments. For more information see the org.gradle.tooling.LongRunningOperation#withArguments(String...) method.

org.gradle.testkit.runner.UnsupportedFeatureException

Thrown when a build was executed with a target Gradle version that does not support a specific feature.

org.gradle.tooling.model.UnsupportedMethodException

Thrown when the tooling API client attempts to use a method that does not exist in the version of Gradle that the tooling API is connected to.

Typically, to resolve such a problem you change/upgrade the target version of Gradle that the tooling API is connected to. Alternatively, you can handle and ignore this exception.

org.gradle.tooling.exceptions.UnsupportedOperationConfigurationException

Thrown when a org.gradle.tooling.LongRunningOperation has been configured with unsupported settings. For example org.gradle.tooling.LongRunningOperation#setJavaHome(java.io.File) might not be supported by the target Gradle version.

org.gradle.tooling.UnsupportedVersionException

Thrown when the target Gradle version does not support a particular feature.

org.gradle.api.tasks.Upload

Uploads the artifacts of a Configuration to a set of repositories.

org.gradle.api.attributes.Usage

Represents the usage of a configuration. Typical usages include compilation or runtime. This interface allows the user to customize usages by implementing this interface.

org.gradle.model.Validate

Denotes that the RuleSource method rule carrying this annotation validates the rule subject.

Validate rules execute after Finalize rules, but before rule subject is used as an input. The first parameter of the rule is the rule subject, which is immutable.

Please see RuleSource for more information on method rules.

org.gradle.plugin.devel.tasks.ValidateTaskProperties

Validates task property annotations.

Task properties must be annotated with one of:

  • Properties taken into account during up-to-date checks:
    • @org.gradle.api.tasks.Input, @org.gradle.api.tasks.Nested, @org.gradle.api.tasks.InputFile, @org.gradle.api.tasks.InputDirectory, @org.gradle.api.tasks.InputFiles to mark it as an input to the task.
    • @org.gradle.api.tasks.OutputFile, @org.gradle.api.tasks.OutputDirectory to mark it as an output of the task.
  • Properties ignored during up-to-date checks:
    • @javax.inject.Inject marks a Gradle service used by the task.
    • @org.gradle.api.tasks.Console marks a property that only influences the console output of the task.
    • @org.gradle.api.tasks.Internal mark an internal property of the task.

org.gradle.plugins.ide.eclipse.model.Variable

A variable library entry.

org.gradle.platform.base.Variant

Declares that a property represents a variant dimension. Variants are used in dependency resolution to discriminate between various binaries that may match the requirements (such as a platform, a build type, ...). This annotation must be set on a getter. The return type of the getter must either be a String or a class implementing org.gradle.api.Named.

org.gradle.platform.base.VariantComponent

A component that has one or more mutually exclusive variants.

org.gradle.platform.base.VariantComponentSpec

Represents a component spec that is made up of one or more mutually exclusive variants.

org.gradle.api.artifacts.VariantMetadata

Represents the metadata of one variant of a component, see ComponentMetadataDetails#withVariant(String, Action).

org.gradle.api.artifacts.transform.VariantTransform

Registration of an variant transform.

org.gradle.api.artifacts.transform.VariantTransformConfigurationException

An exception to report a problem during transformation execution.

org.gradle.vcs.VcsMapping

A dependency mapping provided by a VCS repository.

org.gradle.vcs.VcsMappings

Allows VCS mapping rules to be specified for a build. A VCS mapping rule is responsible for calculating the VCS information for a particular dependency. In settings.gradle:

 sourceControl { vcsMappings { withModule("org.gradle:gradle") { from vcs(GitVersionControlSpec) { url = uri("https://github.com/gradle/gradle") } } all { details -> if (details.requested.group == "org.gradle") { from vcs(GitVersionControlSpec) { url = uri("https://github.com/gradle/${details.requested.module}") } } } } } 

org.gradle.api.tasks.VerificationTask

A VerificationTask is a task which performs some verification of the artifacts produced by a build.

org.gradle.api.artifacts.VersionConstraint

Represents a constrained version. By default, when a dependency has a version number, it is assumed that the version can be upgraded during conflict resolution (typically, version 1.15 can be upgraded to 1.16). However in some cases we don't want this behavior. This class represents the base spec of module constraints.

org.gradle.vcs.VersionControlSpec

Captures user-provided information about a version control system.

org.gradle.nativeplatform.toolchain.VisualCpp

The Visual C++ tool chain.

org.gradle.nativeplatform.toolchain.VisualCppPlatformToolChain

Visual C++ specific settings for the tools used to build for a particular platform.

org.gradle.ide.visualstudio.VisualStudioExtension

The configuration for mapping a set of native components to a Visual Studio project.

org.gradle.ide.visualstudio.plugins.VisualStudioPlugin

A plugin for creating a Visual Studio solution for a gradle project.

org.gradle.ide.visualstudio.VisualStudioProject

A visual studio project, created from one or more native binaries.

The content and location of the generate project file can be modified by the supplied methods:

 apply plugin: "cpp" apply plugin: "visual-studio" model { visualStudio { projects.all { projectFile.location = "vs/${name}.vcxproj" projectFile.withXml { asNode().appendNode('PropertyGroup', [Label: 'Custom']) .appendNode('ProjectDetails', "Project is named ${project.name}") } } } } 

org.gradle.ide.visualstudio.VisualStudioRootExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.ide.visualstudio.VisualStudioRootExtension

The configuration for mapping a set of native components to a Visual Studio project and solution.

org.gradle.ide.visualstudio.VisualStudioSolution

A visual studio solution, representing one or more native binaries in a build.

The content and location of the generate solution file can be modified by the supplied methods:

 apply plugin: "visual-studio" model { visualStudio { solution { solutionFile.location = "vs/${name}.sln" solutionFile.withContent { TextProvider content -> content.asBuilder().insert(0, "# GENERATED FILE: DO NOT EDIT\n") content.text = content.text.replaceAll("HideSolutionNode = FALSE", "HideSolutionNode = TRUE") } } } } 

org.gradle.api.tasks.bundling.War

Assembles a WAR archive.

org.gradle.api.plugins.WarPlugin

A Plugin which extends the JavaPlugin to add tasks which assemble a web application into a WAR file.

org.gradle.api.plugins.WarPluginConvention

A Convention used for the WarPlugin.

org.gradle.api.logging.configuration.WarningMode

Specifies the warning mode a user wants to see.

org.gradle.plugins.ide.eclipse.model.WbDependentModule

A wtp descriptor dependent module entry.

org.gradle.plugins.ide.eclipse.model.WbModuleEntry

Represents an entry in wb-module.

org.gradle.plugins.ide.eclipse.model.WbProperty

A wtp descriptor property entry.

org.gradle.plugins.ide.eclipse.model.WbResource

A wtp descriptor resource entry.

org.gradle.language.rc.tasks.WindowsResourceCompile

Compiles Windows Resource scripts into .res files.

org.gradle.language.rc.plugins.WindowsResourceScriptPlugin

Adds core language support for Windows resource script files.

org.gradle.language.rc.WindowsResourceSet

A set of Windows Resource definition files.

A Windows Resource set contains a set of script files, together with an optional set of header files.

 apply plugin: "windows-resources" model { components { main(NativeLibrarySpec) { sources { rc { source { srcDirs "src/main/rc" include "**/*.rc" } exportedHeaders { srcDirs "src/main/include" } } } } } } 

org.gradle.language.rc.plugins.WindowsResourcesPlugin

A plugin for projects wishing to build native binary components from Windows Resource sources.

Automatically includes the WindowsResourceScriptPlugin for core Windows Resource source support and the NativeComponentPlugin for native component support.

  • Creates a org.gradle.language.rc.tasks.WindowsResourceCompile task for each org.gradle.language.rc.WindowsResourceSet to compile the sources.

org.gradle.api.tasks.WorkResult

Provides information about some work which was performed.

org.gradle.api.tasks.WorkResults

Helps access trivial WorkResult objects.

org.gradle.workers.WorkerConfiguration

Represents the configuration of a worker. Used when submitting an item of work to the WorkerExecutor.

 workerExecutor.submit(RunnableWorkImpl.class) { WorkerConfiguration conf -> conf.isolationMode = IsolationMode.PROCESS forkOptions { JavaForkOptions options -> options.maxHeapSize = "512m" options.systemProperty 'some.prop', 'value' options.jvmArgs "-server" } classpath configurations.fooLibrary conf.params = [ "foo", file('bar') ] } 

org.gradle.workers.WorkerExecutionException

Indicates that a failure occurred during execution of work in a worker.

org.gradle.workers.WorkerExecutor

Allows work to be submitted for asynchronous execution. This api allows for safe, concurrent execution of work items and enables:

  • Parallel execution of work items within a single task
  • Execution in isolated contexts such as an isolated classloader or even a separate process
  • Safe execution of multiple tasks in parallel
Work should be submitted with a Runnable class representing the implementation of the unit of work and an action to configure the unit of work (via WorkerConfiguration).
 workerExecutor.submit(RunnableWorkImpl.class) { WorkerConfiguration conf -> // Set the isolation mode for the worker conf.isolationMode = IsolationMode.NONE // Set up the constructor parameters for the unit of work conf.params = [ "foo", file('bar') ] } 

org.gradle.plugins.ide.idea.model.Workspace

Represents the customizable elements of an ipr (via XML hooks everything of the ipr is customizable).

org.gradle.api.tasks.wrapper.Wrapper

Generates scripts (for *nix and windows) which allow you to build your project with Gradle, without having to install Gradle.

When a user executes a wrapper script the first time, the script downloads and installs the appropriate Gradle distribution and runs the build against this downloaded distribution. Any installed Gradle distribution is ignored when using the wrapper scripts.

The scripts generated by this task are intended to be committed to your version control system. This task also generates a small gradle-wrapper.jar bootstrap JAR file and properties file which should also be committed to your VCS. The scripts delegates to this JAR.

org.gradle.buildinit.plugins.WrapperPlugin

The wrapper plugin.

org.gradle.model.WriteOnlyModelViewException

Thrown when an attempt is made to read the value of a model element that is not readable at the time.

org.gradle.api.tasks.WriteProperties

Writes a java.util.Properties in a way that the results can be expected to be reproducible.

There are a number of differences compared to how properties are stored:

  • no timestamp comment is generated at the beginning of the file
  • the lines in the resulting files are separated by a pre-set separator (defaults to '\n') instead of the system default line separator
  • the properties are sorted alphabetically

Like with java.util.Properties, Unicode characters are escaped when using the default Latin-1 (ISO-8559-1) encoding.

org.gradle.plugins.ide.eclipse.model.WtpComponent

Creates the .settings/org.eclipse.wst.common.component file for WTP projects.

org.gradle.plugins.ide.eclipse.model.WtpFacet

Creates the .settings/org.eclipse.wst.common.project.facet.core.xml file for WTP projects.

org.gradle.nativeplatform.test.xctest.tasks.XCTest

Executes XCTest tests. Test are always run in a single execution.

org.gradle.nativeplatform.test.xctest.plugins.XCTestConventionPlugin

A plugin that sets up the infrastructure for testing native binaries with XCTest test framework. It also adds conventions on top of it.

org.gradle.ide.xcode.XcodeExtension

The configuration for mapping a C++ or Swift project to an XCode project.

org.gradle.ide.xcode.plugins.XcodePlugin

A plugin for creating a XCode project for a gradle project.

org.gradle.ide.xcode.XcodeProject

A xcode project, created from C++ or Swift capable project.

org.gradle.ide.xcode.XcodeRootExtension (extensions in package org.gradle.kotlin.dsl)
org.gradle.ide.xcode.XcodeRootExtension

The configuration for mapping a C++ or Swift project to XCode project and workspace.

org.gradle.ide.xcode.XcodeWorkspace

Represents the generated Xcode workspace.

org.gradle.ide.visualstudio.XmlConfigFile

An XML config file generated for Visual Studio.

org.gradle.plugins.ide.api.XmlFileContentMerger

Models the generation/parsing/merging capabilities. Adds XML-related hooks.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

org.gradle.plugins.ide.api.XmlGeneratorTask

A convenience superclass for those tasks which generate XML configuration files from a domain object of type T.

org.gradle.api.XmlProvider

Provides various ways to access the content of an XML document.

org.gradle.api.tasks.bundling.Zip

Assembles a ZIP archive. The default is to compress the contents of the zip.

org.gradle.api.tasks.bundling.ZipEntryCompression

Specifies the compression level of an archives contents.