I use Spring Boot and want to execute Spotless to reformat code before bootRun everytime, so I write the following tasks in my build.gradle.kts:
task("startServer") {
setGroup("Sample category")
dependsOn(":security:spotlessApply", ":database:spotlessApply").finalizedBy(":convo:bootRun")
}
When I execute this task in debug mode, Intellij doesn't stop at the breakpoint, but if I execute the built-in bootRun task, it works.
How can I let Intellij debug the Spring Boot application started in my startServer tasks?