-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Labels
Description
I am trying to add the Gradle plugin to a subproject directly like so
plugins {
id 'application'
id "com.diffplug.spotless" version "5.10.0"
}
without a build.gradle
for the root project. But ./gradlew b
fails due to
* What went wrong:
Execution failed for task ':spotlessInternalRegisterDependencies'.
> Could not resolve all files for configuration ':detachedConfiguration2'.
> Cannot resolve external dependency com.google.googlejavaformat:google-java-format:1.7 because no repositories are defined.
Required by:
project :
However, if I add the plugin to the root project first or add a repository in the buildscript in the root build.gradle
, the issue is resolved. I am curious why this is the case. I understand spotless use the buildscript of the root project but it eludes why including the plugin in the root project without defining the build script works.