Skip to content

Configuration with name 'shadow' not found. #1784

@hondogo

Description

@hondogo

Expected and Results

Shadow version: 9.2.1

When switching from 9.1.0 to 9.2.1 build start to fail with: 'Configuration with name 'shadow' not found'

Configuration cache state could not be cached: field `shadowDependencies` of task `:taskName` of type `com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar`: error writing value of type 'org.gradle.api.internal.provider.DefaultProvider'
> Configuration with name 'shadow' not found.

Code for task registration:
project.tasks.register("taskName", ShadowJar::class.java) { ... }

Reproducer project:
https://github.com/hondogo/kotlin-issue-reproducer/tree/shadow

Line of code where shadow task created:
https://github.com/hondogo/kotlin-issue-reproducer/blob/6cc320be324c07c9d93b14fe878d8cbf4e61085d/module1/build.gradle.kts#L27

Related environment and versions

No response

Reproduction steps

No response

Anything else?

No response

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