# Incremental Compilation, the Java Library Plugin, and other performance features in Gradle 3.4

DevFeed: [Incremental Compilation, the Java Library Plugin, and other performance features in Gradle 3.4](<https://devfeed.tech/articles/incremental-compilation-the-java-library-plugin-and-other-performance-features-in-gradle-3-4-24647.md>)

Original publisher: [Read original article](<https://blog.gradle.org/incremental-compiler-avoidance>)

Author: Cédric Champeau

Published: 2017-02-25T05:00:00Z

Content type: article

Language: en

Sources: [The Gradle Blog](<https://devfeed.tech/sources/the-gradle-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [build times](<https://devfeed.tech/topics/build-times.md>), [Java](<https://devfeed.tech/topics/java.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [announce](<https://devfeed.tech/tags/announce.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [build](<https://devfeed.tech/tags/build.md>), [build-times](<https://devfeed.tech/tags/build-times.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [features](<https://devfeed.tech/tags/features.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [incremental](<https://devfeed.tech/tags/incremental.md>), [java](<https://devfeed.tech/tags/java.md>), [performance](<https://devfeed.tech/tags/performance.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [upgrade](<https://devfeed.tech/tags/upgrade.md>)

## AI overview

Gradle 3.4 introduces compile avoidance and improved incremental compilation for Java builds. The article explains how these features reduce unnecessary recompilation, including across dependent projects, and reports faster builds in several synthetic benchmark scenarios.

## Source excerpt

We are very proud to announce that the newly released Gradle 3.4 has significantly improved support for building Java applications, for all kind of users. This post explains in details what we fixed, improved and added. We will in particular focus on: Extremely fast incremental builds The end of the dreaded compile classpath leakage The improvements we made can dramatically improve your build times. Here's what we measured: The benchmarks are public, and you can try them out yourself and are synthetic projects representing real world issues reported by our consumers. In particular, what matters in a continuous development process is being incremental (making a small change should never result in a long build): For those who work on a single project with lots of sources: changing a single file, in a big monolithic project and recompiling changing a single file, in a medium-sized monolithic project and recompiling For multi-project builds: making a change in an ABI-compatible way (change the body of a method, for example, but not method signatures) in a subproject, and recompiling making a change in an ABI-incompatible way (change a public method signature, for example) in a subproject, and recompiling For all those scenarios, Gradle 3.4 is much faster. Let's see how we did this. Compile avoidance for all One of the greatest changes in Gradle 3.4 regarding Java support just comes for free: upgrade to Gradle 3.4 and benefit from compile avoidance. Compile avoidance is different from incremental compilation, which we will cover later. So what does it mean? It's actually very simple. Imagine that your project app depends on project core, which itself depends on project utils: In app: public class Main { public static void main(String... args) { WordCount wc = new WordCount(); wc.collect(new File(args[0]); System.out.println("Word count: " + wc.wordCount()); } } In core: public class WordCount { // WordCount lives in project `core` // ... void collect(File source) { IOUti