gradle-maven-publish-plugin icon indicating copy to clipboard operation
gradle-maven-publish-plugin copied to clipboard

`findProperty()` violates isolated project constraints

Open solrudev opened this issue 1 year ago • 1 comments

When enabling isolated projects option for Gradle, project sync failure contains the following violation:

Project {project_name} cannot dynamically look up a property in the parent project :

Stack trace points to this line.

Possible replacement for findProperty() is providers.gradleProperty().

solrudev avatar Nov 20 '24 07:11 solrudev

Unfortunately gradleProperty and findProperty are not the same. gradleProperty will only return properties from the root project, user home or cli, while findProperty also returns properties from the project's gradle.properties. See https://github.com/gradle/gradle/issues/23572 which is effectively a blocker. We rely on being able to read project properties for configuring module specific things like the name or artifact id.

That said some usages can probably be replaced already, so that projects that use the base plugin and don't call pomFromGradleProperties are compatible with isolated projects.

gabrielittner avatar Nov 20 '24 12:11 gabrielittner

Looks this has been fixed by #1181.

Goooler avatar Nov 06 '25 09:11 Goooler