I am currently trying to achieve a daemon-like process that automatically triggers a task (usually compilation, but could be any theoretically) when a file changes.
One prototype I have made involves using the Tooling API embedded in a separate application which is then run in the project folder. I then manually detect any file changes to the directories I am watching then trigger a build. The drawback to this is that I have to distribute a whole application to users in order to do this.
I am trying to see if anyone here has attempted this as a Gradle task/plugin. Maybe even perhaps as a JavaExec?
I suspect that there might be issues trying to run two different tasks on the same build on the same daemon, especially if the “parent” build is still executing, with regards to model caching or task caching. But theretically speaking, would this be possible?