Skip navigation links

Introduction

This document lists changes made to the Gradle Java Project API.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:

OpenIDE-Module-Module-Dependencies: org.netbeans.modules.gradle.java/0 > 1.20

Changes by affected class

org.netbeans.modules.gradle.java.api.GradleJavaSourceSet

org.netbeans.modules.gradle.java.spi.support.JavaToolchainSupport

org.netbeans.modules.gradle.java.api.output.Location

org.netbeans.modules.gradle.java.api.ProjectActions


Details of all changes by API and date


Gradle Java Project API

Support for per-language output directories

Jan 4 '24; API spec. version: 1.26; affected top-level classes: GradleJavaSourceSet JavaToolchainSupport; made by: lkishalmi

Gradle 6.7 introduced Java Toolchains to separate Gradle Java Runtime and the Java used for compilation (and other Java execution). GradleJavaSourceSet.getCompilerJavaHome has been added to return the Java Home of the JDK in use for compilation.

In addition JavaToolchainSsupport is provided in order to be easily work with the JDK home directories.

Support for per-language output directories

Jun 28 '22; API spec. version: 1.19; affected top-level classes: GradleJavaSourceSet; made by: sdedic
Each language plugin typically generates output to a specific directory. The mapping allows more precise output-to-source mapping.

Location can represent nested classes

Feb 18 '22; API spec. version: 1.17; affected top-level classes: Location; made by: ratcashdev; issues: NETBEANS-6041
Location is now capabe to represent java code location inside nested classes as well.

Deprecating Gradle 7.0 removed API-s

Apr 10 '21; API spec. version: 1.13; affected top-level classes: GradleJavaSourceSet; made by: lkishalmi; issues: NETBEANS-5541
GradleJavaSourceSet methods getCompileConfigurationName() and getRuntimeConfigurationName() were deprecated as Gradle 7.0 does no longer supports them. They return null on Gradle 7.0.

Support for explicit commandline arguments

Mar 27 '21; API spec. version: 1.12; affected top-level classes: ProjectActions; made by: sdedic; issues: NETBEANS-5482
Gradle Java interpolate javaExec.jvmArgs and javaExec.args tokens in action mapping that can be used to pass explicit JVM and application parameters to user process started by Gradle build. For more details, see ProjectActions.TOKEN_JAVAEXEC_JVMARGS

Support Kotlin Source Directories

Nov 22 '20; API spec. version: 1.15; affected top-level classes: GradleJavaSourceSet; made by: jpesek; issues: NETBEANS-5050
Sourcsets introduce a new SourceType called KOTLIN It is possible to retrieve the kotlin source directories form a GradleJavaSourceSet from now.

Support Generated Source Directories

Jul 5 '20; API spec. version: 1.8; affected top-level classes: GradleJavaSourceSet; made by: lkishalmi; issues: NETBEANS-4278
Sourcsets introduce a new SourceType called GENERATED. It is possible to retrieve the generated source directories form a GradleJavaSourceSet from now.

Compiler arguments are accessible for SourceSet-s and minor enhancements

Sep 16 '19; API spec. version: 1.4; affected top-level classes: GradleJavaSourceSet; made by: lkishalmi; issues: NETBEANS-2941
Sourcsets can return the used compiler arguments on it's default compiler tasks for Java, Groovy and Scala as well.