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

送分小仙女□ 提交于 2021-01-27 21:50:56

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/43042305/how-to-compile-only-changed-file-using-gradle-build-in-java-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!