diffplug / diffplug/goomph

Cross-project property lookups are incompatible with Gradle isolated projects

Aperta
#225 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
137
Fork
33
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

[Gradle isolated projects](https://docs.gradle.org/current/userguide/isolated_projects.html#sec:migration_path) 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](https://docs.gradle.org/current/userguide/isolated_projects.html#sec:enable) results in errors like the following:

```terminaloutput
- 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)`:

https://github.com/diffplug/goomph/blob/7e7e41cd68c100ff1e6efdc8010bf8e60b7500a7/src/main/java/com/diffplug/gradle/GoomphCacheLocations.java#L56

See also related discussion in gradle/gradle#36998. Note especially [this comment](https://github.com/gradle/gradle/issues/36998#issuecomment-4617263322) near the very end that "We are getting rid of the `Project.getProperties()` method."

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with src/main/java/com/diffplug/gradle/GoomphCacheLocations.java at line 56 in GoomphCacheLocations.initFromProject(Project), then reproduce the failure with Gradle isolated projects enabled. Read the linked Gradle issue and its migration guidance, and verify the plugin no longer triggers the cross-project dynamic property lookup error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.