For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

java

abstract fun java(@Nullable @DelegatesTo(value = SourceDirectorySet::class) configureClosure: @Nullable Closure): SourceSet(source)

Configures the Java source for this set.

The given closure is used to configure the SourceDirectorySet which contains the Java source.

Return

this

Since

0.8

Parameters

configureClosure

The closure to use to configure the Java source.


abstract fun java(configureAction: Action<in SourceDirectorySet>): SourceSet(source)

Configures the Java source for this set.

The given action is used to configure the SourceDirectorySet which contains the Java source.

Return

this

Since

3.3

Parameters

configureAction

The action to use to configure the Java source.