gradlegradlewversions

Gradle and Gradle wrapper versions


Can I have Gradle of version 2.10 and inside the build.gradle define a wrapper of version 3.0?

task wrapper(type: Wrapper) {
    gradleVersion = "3.0"
}

Solution

  • The configuration in build.gradle just has influence for the wrapper task. It will create the wrapper configuration with this version if you execute gradle wrapper.

    Alternatively you can just change the version directly in the gradle-wrapper.properties as you did.