Gradle 6.4 arrives with support for building and testing Java modules

Share

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.

The post Gradle 6.4 arrives with support for building and testing Java modules appeared first on JAXenter.

Source : JAXenter