Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Gradle version in Eclipse using Buildship?

I am running Eclipse Luna SR2 with Buildship 1.0.1.

The Gradle projects I create using the wizard are building with Gradle 2.5-rc-2, but I would like to use 2.6 which is the latest version.

How can I do it?

Setting the task had no effect:

apply plugin: 'java'

repositories {
    jcenter()
}

dependencies {
    testCompile 'junit:junit:4.12'
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.6'
}

Solution: For some reason it is only working if I restart Eclipse after setting the version as Makoto suggested.

like image 371
Evandro Pomatti Avatar asked Aug 16 '15 05:08

Evandro Pomatti


1 Answers

If you want to use the wrapper, it's a simple matter of setting the gradleVersion property:

task wrapper(type: Wrapper) {
    gradleVersion = '2.6'
}
like image 128
Makoto Avatar answered Sep 28 '22 01:09

Makoto