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

./gradlew build

or, on Windows

.\gradlew.bat build

in your project root folder.

Documentation.


  1. Open File gradle-wrapper.properties
  2. You will find distributionUrl with value something like distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
  3. 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)

./gradlew build

I am guessing it would be similar on windows

.\gradlew.bat build

You CANNOT use

gradle build

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