Composite builds: using build directories instead of packaged jar?


I have a Spring Boot project that is structured as modules (core, mail, …) that are reused in multiple applications. These modules are stored in separate repositories and are then included in the main application by includeBuild '../xyz-core' or similar. This works without problems so far.

But I am not quite happy yet with the spring-devtools auto reload story. I’d like to be able to change some resource files or classes without re-compiling the whole dependency as a jar. For example my IDE or a dedicated Gradle task would just copy or recompile some files to build/ and spring-devtools would reload the application because of the change.

For this to work I think it would require the includeBuild dependencies to be substituted by the “unpackaged” build output directories (build/classes/main, build/resources/main, …) instead of a jar file.

Would it be possible to configure something like this with Gradle?