build.gradle file as follows :
task hello {
doLast {
println “Hello world !”
}
}
task wrapper (type: Wrapper){
gradleVersion = ‘7.4.2’
archiveBase = ‘GRADLE_USER_HOME’
archivePath = ‘wrapper/dists’
distributionBase = ‘GRADLE_USER_HOME’
distributionPath = ‘wrapper/dists’
distributionUrl = ‘https://services.gradle.org/distributions/gradle-7.4.2-all.zip’
}
the folowing error occurred in the build:
gradle wrapper
FAILURE: Build failed with an exception.
-
Where:
Build file ‘D:\edu\edu_gradle\build.gradle’ line: 6 -
What went wrong:
A problem occurred evaluating root project ‘edu_gradle’.
Cannot add task ‘wrapper’ as a task with that name already exists.
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 1s
can you elp me solve it?