Skip to content

DefaultTaskCollection#configureEach(Action) on task set cannot be executed in the current context since 8.10.1 #30497

@tom-mi

Description

@tom-mi

Current Behavior

We experience sporadic build failures with error messages like this:

Could not determine the dependencies of task ':foo:compileKotlin'.
> Could not create task ':foo:checkKotlinGradlePluginConfigurationErrors'.
   > DefaultTaskCollection#configureEach(Action) on task set cannot be executed in the current context.

This started when upgrading from version 8.10.0 to 8.10.1.

The error occurs in our pipelines & locally and seems to go away when running the build a second (or third, or fourth) time.
The error also does not occur always, but only sometimes, so it is very much fun to reproduce :(

When running ./gradlew build directly after the error occured, the build succeeds.

Expected Behavior

Successful build

Context (optional)

No response

Self-contained Reproducer Project

https://github.com/tom-mi/gradle-8.10.1-build-issue-demo

Gradle version

8.10.1

Build scan URL (optional)

No response

Your Environment (optional)

We run this on corretto21 on AWS CodeBuild. But the error also occurs when building locally, also with corretto21, at least on thefollowing operating systems:

  • ArchLinux
  • AmazonLinux
  • MacOS

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions