Trigger hot reload manually?
Answered
When using Gradle, building the project triggers the `classes` and `testClasses` tasks for the root project and all sub-projects. We require a custom task that disables another task which is called down the task graph of `classes` on one of our sub-projects. The problem is, since this task is executed as a run, not a build, IntelliJ does not hot reload the changes in debug mode.
Is there a way to manually trigger the hot swap, without executing the `classes` and `testClasses` tasks?
Please sign in to leave a comment.
I created this custom task:
If I run with JRebel debug, after I run the task, JRebel performs the hot reload. This obviously works because JRebel watches the Gradle build directory for changes.
Is there a way to accomplish the same with IntelliJ's debugger?
See also https://stackoverflow.com/questions/6402162/how-to-enable-intellij-hot-code-swap