Gradle 3.4 is now available
We're excited to bring you 3 incredible performance features in this release.
First up: Compile Avoidance. We've introduced a new mechanism for up-to-date checking of Java compilation that is sensitive to public API changes only. This means that if you change a comment or even a private API in a downstream project, Java compilation for upstream projects will be
Next: A stable incremental Java compiler. We've smartened the handling of constants, backed it with in-memory caches, and fixed many bugs. It is now production-ready for your build and has been promoted out of
Finally: A brand new Java Library Plugin. Use this when building a component intended to be used as a dependency from another project. It provides a strong separation between public (exported) and private code which not only gives great performance benefits (because consumers' compile classpaths are smaller), but also an architectural tool for library authors.
It is not just large projects that reap the benefits, for example the same use case for Apache Polygene was reduced from 14 seconds to 7 seconds. Huge kudos to our performance team for delivering such massive performance improvements with this release.
You can learn more in this blog post about incremental compilation, compile avoidance and other performance features of Gradle 3.4.
Now, with your help and guidance we've been able to made a couple of highly-requested code-quality plugins improvements:
- The JaCoCo plugin now allows you to enforce code coverage metrics and fail the build if they're not met.
- The default version of JaCoCo used by the JaCoCo plugin has been raised and the plugin is now Java 9-ready.
- The Checkstyle plugin now allows a maximum number of warnings or errors to be configured.
A special thank you to those who voted and contributed to these issues.
The community's voice clearly indicated the need for verifying JaCoCo code coverage metrics. The JaCoCo plugin in Gradle 3.4 verifies code coverage metrics and will fail the build if code coverage falls below a configurable threshold. The plugin is also fully prepared to run on Java 9.
Last but not least, we've made it more convenient to let Gradle know when you want a build scan — just use
--no-scan if not). No need for the "magic" system property
Check the full 3.4 release notes for more information.
Switch your build to use Gradle 3.4 quickly by updating your wrapper properties:
./gradlew wrapper --gradle-version=3.4
Standalone downloads are available at https://gradle.org/releases.