Suppose I have a composite build of 2 projects: the main project and an included build (project included
).
When I run ./gradlew help
, Gradle produces 2 project-specific cache directories: .gradle
and included/.gradle
. However, when I run ./gradlew help --project-cache-dir SOME_DIR
, Gradle produces only 1 cache directory.
The documentation says:
--project-cache-dir
Specifies the project-specific cache directory. Default value is
.gradle
in the root project directory.
I expect ./gradlew help
and ./gradlew help --project-cache-dir .gradle
would behave the same. However, the latter produces .gradle
directory, but not included/.gradle
. Is this expected or is this a bug?
I also experiment with property org.gradle.projectcachedir
in gradle.properties
with different values between the main project and included
. It seems only the property for the main project takes effect, the property in the included project is ignored.