```gradle build -t``` allows you to always automat...
# gradle
j
Copy code
gradle build -t
allows you to always automatically build when you make changes is there a way to automatically restart an application after a rebuild? I was trying
Copy code
gradle run -t
which is running the application, but it doesn't rebuild and restart when making changes.
h
To automatically restart a task, Gradle needs to know, if your task is finished. The
run
task never finishes, so Gradle would need to cancel the task, which could be wrong.
j
Mmm, good point
Kotlin js uses similar strategy to support continuos mode for webpack run tasks
You can then check if the service is running and restart it from the task. That way the task can complete without killing the service. Of course you'll want to check for continuous mode and make task blocking when it's not continuous.
j
is that from the Gradle Build Services? https://docs.gradle.org/current/userguide/build_services.html looks super interesting, thanks for the links!
b
Yes, that's exactly it