I would like to upgrade Gradle Wrapper version from 7.0.2 to 8.2.1 using command from official documentation(The Gradle Wrapper)):
./gradlew wrapper --gradle-version 8.2.1 --distribution-type bin
Installed local Gradle:
$ gradle -v
------------------------------------------------------------
Gradle 8.2.1
------------------------------------------------------------
Build time: 2023-07-10 12:12:35 UTC
Revision: a38ec64d3c4612da9083cc506a1ccb212afeecaa
Kotlin: 1.8.20
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.7 (Oracle Corporation 17.0.7+8-LTS-224)
OS: Windows 11 10.0 amd64
According to the official documentation (Gradle 7.0.2):
Every vanilla Gradle build comes with a built-in task called
wrapper
But when I try to run the commands:
// using local Gradle
$ gradle wrapper --gradle-version 8.2.1 --distribution-type bin
// or using wrapper
$ ./gradlew wrapper --gradle-version 8.2.1 --distribution-type bin
I get an error:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'wrapper' not found in project ':prj-name-here'.
Why does the official documentation say that Gradle has a āwrapperā task, but when I try to run this task, I get an error that this task does not exist?