diffplug / diffplug/spotless

spotless configuration crash when using convention plugins combined with settings plugins.

Offen
#1,633 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
559
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
43

Beschreibung

- Gradle 8.0.2
- Spotless 6.17.0

Stacktrace:

```
* What went wrong:
A problem occurred configuring root project 'foo'.
> Could not resolve all files for configuration ':spotless1316845977'.
> Cannot resolve external dependency com.facebook:ktfmt:0.43 because no repositories are defined.
Required by:
project :
```

If a convention plugin applies Spotless on the root project and this convention plugin is applied via a settings plugin, I got this crash.

I think there is a warning from Gradle about resolving this configuration in the configuration phase instead of lazily too.

In the root project, it is used `predeclareDepsFromBuildscript()`

If I apply the convention plugin directly instead of being applied by the settings plugin this is not happening.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere den Absturz mit Gradle 8.0.2 und Spotless 6.17.0, indem du ein Convention-Plugin über ein Settings-Plugin anwendest und dabei predeclareDepsFromBuildscript() im Root-Projekt verwendest. Vergleiche dieses Setup mit der direkten Anwendung des Convention-Plugins und untersuche die Warnung zur Konfigurationsauflösung. Als erledigt gilt die Aufgabe, wenn das Settings-Plugin-Setup erfolgreich konfiguriert wird, ohne vorzeitig Repositories zu benötigen oder die Konfiguration während der Konfigurationsphase aufzulösen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.