Gradle Wrapper validation failed after update to Gradle 8.5
Closed this issue · 2 comments
I run sha256sum .\gradle-wrapper.jar
locally and the result is d3b261c2820e9e3d8d639ed084900f11f4a86050a8f83342ade7b6bc9b0d2bdd
which is the same as https://services.gradle.org/distributions/gradle-8.5-wrapper.jar.sha256
I have no idea why it shows c7b7b1c6cfacde8aa3c4485f2b367ff99c6ef1d57e2d4d98f4b7e0dcfecc4954
on the CI.
I've encountered exactly the same problem, even the same sha256 sum. It's because Git mistakenly consider the version 8.5 gradle-wrapper.jar
file as a text file and automatically change the line ending CRLF to LF, though it was not the same behavior before version 8.5. Adding *.jar -text
to your .gitattribute and regenerate the wrapper jar should fix the problem.
@Eterocell Thanks, this is exactly the problem I'm having. Appreciate your response!