Getting gradle for auto build after code changes

Is there a way to add something to the 'build.gradle' file so that it automatically builds on the changes made to the code inside the project? Or are there tricks with gradle or java to automatically compile / build the project?

+4
source share
1 answer

Use gradle --continuous myTask.

This is a feature of the new 2.5 version .

When launched with command line options, -continuous or -t Gradle will not complete at the end of the build. Instead, Gradle will expect the files processed by the assembly to be modified. When changes are detected, Gradle will restart the previous build with the same task selection.

. Continuous Build.

+5

Source: https://habr.com/ru/post/1598257/


All Articles