You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression in Gradle plugin v8.3.0: Cannot set the value of task ':integTest:spotlessJava' property 'taskService' #2877
Caused by: java.lang.IllegalArgumentException: Cannot set the value of task ':integTest:spotlessJava' property 'taskService' of type com.diffplug.gradle.spotless.SpotlessTaskService loaded with InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:]:project-integTest(export)}) using a provider of type com.diffplug.gradle.spotless.SpotlessTaskService loaded with InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:]:project-incap(export)}).
This can be caused by a plugin being applied to two sibling projects and then using a shared build service. To fix this, use `@ServiceReference` or add the problematic plugin with `apply false` to the root build script.
This happens in a multi-project build where the root project doesn't have a build.gradle.kts, so the spotless plugin isn't applied on the root project; and indeed adding it with apply false works around the error.
Either this should be documented as a new requirement, or the plugin should use @ServiceReference (if that makes a difference; but then also require Gradle >= 8)
Reacted by Kyle Johnson, Artem Gorbounov, Sven Jacobs, Viacheslav Chernyshev, Daniel Soneira, Vedran Pavic, Antoine Belvire, Carl Mastrangelo, Kacper Martela and Patrick Lampe Dittmer
We've also hit this bug in a project that does have a root-level build.gradle.kts that applies some code coverage and static analysis plugins. Unfortunately, I can't share the logs as it's proprietary.
Can this be looked into? We apply spotless as part of a shared binary java plugin that defines the necessary conventions. Forcing the users to also add it to their root build with apply false is not ideal.
Activity
v-chernyshev commentedon Mar 16, 2026
We've also hit this bug in a project that does have a root-level
build.gradle.ktsthat applies some code coverage and static analysis plugins. Unfortunately, I can't share the logs as it's proprietary.Update Spotless to 8.4.0
schaarda commentedon Mar 25, 2026
We had the same error when we started using
org.gradle.configuration-cache=trueRemoved this and it worked again.
v-chernyshev commentedon Jun 26, 2026
Can this be looked into? We apply
spotlessas part of a shared binary java plugin that defines the necessary conventions. Forcing the users to also add it to their root build withapply falseis not ideal.