Skip to content

Cross-project property lookups are incompatible with Gradle isolated projects #225

Description

@liblit

Gradle isolated projects restrict how one (sub)project can access mutable state in another (sub)project. Version 4.4.1 of the com.diffplug.eclipse.mavencentral plugin violates these restrictions. Attempting to use this plugin with isolated projects enabled results in errors like the following:

- Plugin 'com.diffplug.eclipse.mavencentral': Project ':xxx:yyy:zzz' cannot dynamically look up a property in the parent project ':xxx:yyy'

Using a stack trace for additional context reveals that the problematic code is at GoomphCacheLocations.java:56 in com.diffplug.gradle. GoomphCacheLocations. initFromProject(Project):

Object value = project.getProperties().get("goomph_" + field.getName());

See also related discussion in gradle/gradle#36998. Note especially this comment near the very end that "We are getting rid of the Project.getProperties() method."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions