diffplug / diffplug/spotless

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

Open
#1,633 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

- 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.