days
0
-24
-4
hours
-2
-2
minutes
-3
-4
seconds
-1
-9
search
New features for Gradle

Gradle 6.4 arrives with support for building and testing Java modules

Maika Möbus
Gradle 6.4
© Shutterstock / M.S.A VISUAL CO

The open source build automation system Gradle has been released in version 6.4. Among other new features, breaking changes and bug fixes, it now supports building and testing Java modules. Read on to find out how to use the new feature and what else is new.

The Gradle team has announced the release of version 6.4. It comes with several new features, bug fixes, and potential breaking changes. There are currently no known issues in this release. Let’s take a closer look and see what’s new.

SEE ALSO: GitHub report: Developers remain productive during quarantine

Java Module System support

Gradle 6.4 supports the Java Module System for building, testing and running Java modules—a feature that was highly anticipated according to the developer team. Building Javadoc and running applications is supported as well.

To get started, module path inference must be configured for the Java plugins as the Gradle team demonstrates:

java {

modularity.inferModulePath.set(true)

}

The instructions further point out that a module-info.java descriptor must then be provided as part of their sources to ensure that users write a proper Java module:

src

└── main

└── java

└── module-info.java

Other updates and breaking changes

The latest Gradle version also allows precompiled script plugins to be written with the Groovy DSL, in addition to the already supported Kotlin DSL. Other updates include improved dependency locking and updates to the PMD code quality plugin.

The dependency variant matching error messages should now be better readable by humans and introduce the highlighting of problems in color:

The Gradle upgrade guide offers information on potential breaking changes. For example, Gradle 6.4 enables incremental analysis in the PMD plugin by default. As this requires PMD 6.0.0 or higher, it can be a breaking change. Instead, users can opt to disable incremental analysis and thereby use earlier PMD versions.

SEE ALSO: Quarkus – an IO thread and a worker thread walk into a bar: a microbenchmark story

Gradle is compatible with Java 8 to 14, while Java 6 and 7 can still be used for compilation and forked test execution. The upcoming version Java 15 is not yet supported.

See the full release notes for more details.

Author
Maika Möbus
Maika Möbus has been an editor for Software & Support Media since January 2019. She studied Sociology at Goethe University Frankfurt and Johannes Gutenberg University Mainz.

Leave a Reply

avatar
400