repro:
- kill any running daemon
- cd <multi-project-root-dir>
- ./gradlew build
- Notice everything works as expected, all subprojects build
- cd <multi-project-root-dir>/<subproject1-dir>
- ../gradlew build
- Notice that all projects build. This is unexpected; only the leaf node project should build.
This unexpected behavior is appears to be due to the Gradle daemon caching CWD the first time it's run. This amounts to an unusable experience, even within the same multi-project build.
For now, we're running with --no-daemon to avoid this.
It is also a problem when working across projects. Starting the daemon in project1 means that any gradle invocations from project2 will inadvertently trigger builds in project1 – not exactly what's expected.
|