Skip to content

Conversation

@jdaugherty
Copy link
Contributor

@jdaugherty jdaugherty commented Nov 10, 2025

This was an extremely frustrating bug for multiproject builds. The gradle plugins were calling System.setProperty() as part of any grails gradle plugin setup - which means the set Property is for the life of that jvm instance. Since gradle is threaded, with multiproject builds, it resulted in a race condition / random setting of this field. This meant that the basedir was incorrectly set for bootRun, etc. It was even complicated more in that if it was set for that daemon process, it would remain set.

We already set other properties as part of task execution, so this PR takes the same approach. This does mean that the properties are no longer set for gradle code, but after testing, I think this is ok.

@jdaugherty jdaugherty changed the title remove calls to setSystemProperty() and set on individual tasks instead Gradle Plugin Fix - remove calls to setSystemProperty() and set on individual tasks instead Nov 10, 2025
@jdaugherty
Copy link
Contributor Author

Fixes #15222

@jdaugherty jdaugherty merged commit 327efd6 into apache:7.0.x Nov 10, 2025
58 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

base.dir can be set incorrectly for bootRun and other gradle tasks

4 participants