Goutham Nithyananda
Goutham Nithyananda

Reputation: 939

How to compile only changed file using gradle build in java projects

I am using gradle to build a java project.

I see that whenever there is a change in one java file entire projects gets rebuilt. Is there a way to compile only affected java files instead of all the files.

Upvotes: 3

Views: 7183

Answers (1)

Filip Allberg
Filip Allberg

Reputation: 5271

Gradle now supports compile avoidance, and has support for incremental compilation since earlier. You do not have to do anything to enjoy these features. Just update Gradle. See https://blog.gradle.org/incremental-compiler-avoidance

Upvotes: 3

Related Questions