Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load the value of field transformer of org.gradle.api.internal.file.copy.RenamingCopyAction bean with configuration cache #1098

Open
bgranvea opened this issue May 30, 2022 · 0 comments

Comments

@bgranvea
Copy link

Current Behavior

Exception at second execution when configuration cache is enabled.

Configuration cache is an incubating feature.
Reusing configuration cache.

FAILURE: Build failed with an exception.

* What went wrong:
Could not load the value of field `transformer` of `org.gradle.api.internal.file.copy.RenamingCopyAction` bean found in field `mainSpec` of task `:copyAndRename` of type `org.gradle.api.tasks.Copy`.
> org.gradle.api.internal.file.copy.CopySpecWrapper$$Lambda$1762/650180744

Context

Custom task which copies a single file and rename it.

Steps to Reproduce (for bugs)

build.gradle:

task copyAndRename(type: Copy) {
    from("foo.txt") {
        into "dest"
        rename { filename -> 'bar.txt' }
    }

    into "$buildDir"
}

User gradle.properties:

org.gradle.unsafe.configuration-cache=true
org.gradle.parallel=true

execute gradlew copyAndRename twice.

Your Environment

Gradle 7.4.2, JDK 8, Windows 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant