javagradlebuild.gradle

gradle 8.4: copy dependencies


I'm upgrading to gradle 8.4 from 7.4. I have a task

task {
    copyDependencies(type: Copy) {
        from configurations.default
        into '../out/bin/lib'
    }
}

which copy my dependencies to '../out/bin/lib' and I had

jar.finalizedBy = [copyDependencies]

But this is no more working. I checked already the upgrade guide but found no solution.

Any ideas ?


Solution

  • You don't want to use the configuration default, but runtimeClasspath.