Trigger hot reload manually?


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?


I created this custom task:

create("buildWithoutVaadin") {
    doFirst {
        vaadinPrepareFrontend {
            enabled = false
    finalizedBy(":classes", ":webapp:classes", ":webapp:webappResourceClasses")

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?

Does it help if you switch to using IntelliJ IDEA to build and run the code instead of Gradle, from File | Settings | Build, Execution, Deployment | Build Tools | Gradle settings?

See also

Please sign in to leave a comment.