Skip to content

Regression in Gradle plugin v8.3.0: Cannot set the value of task ':integTest:spotlessJava' property 'taskService' #2877

Open

Description

@tbroyer

See https://github.com/tbroyer/gradle-incap-helper/actions/runs/23116714774/job/67143450577?pr=53.

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)

Activity

  1. v-chernyshev commented on Mar 16, 2026

    @v-chernyshev

    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.

  2. added a commit that references this issue on Mar 21, 2026
  3. schaarda commented on Mar 25, 2026

    @schaarda

    We had the same error when we started using
    org.gradle.configuration-cache=true

    Removed this and it worked again.

  4. v-chernyshev commented on Jun 26, 2026

    @v-chernyshev

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions