Spring Boot plugin requires Gradle 4.10 or later. The current version is Gradle 4.1
If you're using the command
gradle build, then you're not using the wrapper, and thus not using the version of gradle configured in the wrapper properties. You're using the global gradle version installed on your machine.
To use the gradle wrapper, use
or, on Windows
in your project root folder.
- Open File
- You will find
distributionUrlwith value something like
- Change the gradle version to greater than 4.10 , as I have 5.6.2
Note, this will upgrade the locally scoped gradle version. (As opposed to the system wide gradle install) You will have to use the gradlew(rapper) to invoke.
For example (on linux based)
I am guessing it would be similar on windows
You CANNOT use
because that will call the machine-scoped version (which will be the old version probably)
Full locally scoped output below:
./gradlew build Welcome to Gradle 5.6.2! Here are the highlights of this release: - Incremental Groovy compilation - Groovy compile avoidance - Test fixtures for Java projects - Manage plugin versions via settings script