Hi, I got this warning from gradle 8.8. But I can ...
# community-support
a
Hi, I got this warning from gradle 8.8. But I can not find where I used getMode().
Copy code
> Task :checker:shadowJar
The FileTreeElement.getMode() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the getPermissions() method instead. Consult the upgrading guide for further information: <https://docs.gradle.org/8.8/userguide/upgrading_version_8.html#unix_file_permissions_deprecated>
Here is my shadowJar task.
Copy code
shadowJar {
    description 'Creates checker-VERSION-all.jar and copies it to dist/checker.jar.'
    // To see what files are incorporated into the shadow jar file:
    // doFirst { println sourceSets.main.runtimeClasspath.asPath }
    archiveClassifier = 'all'
    doLast{
        copy {
            from archiveFile.get()
            into file("${projectDir}/dist")
            rename 'checker.*', 'checker.jar'
        }
    }

    minimize()
}
Can someone share some insight here?
t
You can run with
--stacktrace
to see exactly where it comes from. It's likely from the shadow plugin itself though, you should report it: https://github.com/johnrengelman/shadow
Btw, can't you configure the task to directly output to the filepath you want rather than use that copy action in doLast?