2

currently I'm working on a java project which is built by gradle. The project consists of an web-api micronaut subproject and some library subprojects. See output

.\gradlew -q projects

Root project 'mbtn_be'
+--- Project ':app'
+--- Project ':db'
+--- Project ':model'
+--- Project ':repository'
\--- Project ':service'

settings.gradle

rootProject.name = 'mbtn_be'

include 'service', 'db', 'model', 'app', 'repository'

In case of development I execute the project with .\gradlew run -t. If I change something in the app (web-api by micronaut) gradle rebuilds instantly the code.

But if I change something in the other subprojects the changes won't built again. It seems that only 'app' is built on changes.

I've googled around to find a solution without luck.

Do you have an idea how to build all subprojects on changes?

Thanks a lot :)

Sebastian

Pace17881
  • 91
  • 7

1 Answers1

1

Micronaut's file watching only works in the project where the run task is defined, that is to say in your app project. This is a limitation of the Micronaut Gradle plugin right now.

melix
  • 1,510
  • 7
  • 6