Hi,
I have a multiproject build with org.gradle.parallel set to true in a gradle.properties of the root project, and a gradle wrapper in the root project as well. If I call the gradle wrapper from a subproject, the properties of the root project gradle.properties to configure the gradle build environment (such as org.gradle.parallel) are not honoured. In contrast, user-defined properties in the same gradle.properties are accessible in the build script of the subproject.
Is this expected behaviour? If yes, what is the suggested way to use gradle in such a use case?
Thanks,
Luzi
Do you mean something like this?
$ cd subproject
$ ../gradlew build
I’m not currently able to replicate this problem.
I forgot to mention that I have a flat multiproject with a project named master containing the settings.gradle.
root
|–master
| - settings.gradle
|–subproject
In the scenario you described, the problem does not arise.
Thanks for the report. I’ve raised this issue as GRADLE-3341.
Thanks for raising an issue. As a workaround, I see
- using -parallel explicitly
- only call tasks from the root project
Do you have any other alternatives?
For per-project, I don’t believe so. You could globally enable parallel by setting the property in GRADLE_OPTS
or a gradle.properties file in ~/.gradle.