I have an old project with Gradle 2.1. Today I want to "upgrade" the gradle wrapper version to 6.5.1, so I used this:
./gradlew wrapper --gradle-version 6.5.1
But the output is:
FAILURE: Build failed with an exception.
* What went wrong:
Problem configuring task :wrapper from command line.
> Unknown command-line option '--gradle-version'.
* Try:
Run gradlew help --task :wrapper to get task usage details. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Seems like the param --gradle-version was not available at that time (2.1). Tried a lot googling without any luck. Could you please show me how to overcome this? Thanks.
you can manually edit
<prj_home>/gradle/wrapper/gradle-wrapper.properties
set
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
then
./gradlew wrapper
will work