STS plugin is not respecting version specified in gradle wrapper and always defaulting to use 1.2


(Abhishek Nath) #1

STS plugin is not respecting version specified in gradle wrapper and always defaulting to use 1.2. We have configuration like this:

// build.gradle task wrapper(type: Wrapper) {

gradleVersion = ‘1.5’

jarFile = ‘buildtools/gradle-wrapper/wrapper.jar’

distributionPath = “…/gradle-bin”

}

// wrapper.properties distributionBase=GRADLE_USER_HOME distributionPath=…/gradle-bin zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http://services.gradle.org/distributions/gradle-1.5-bin.zip

Looks like plugin is using version defined in gradle-api.properties file that comes bundled with plugin.


(Luke Daley) #2

You’ll get an answer asking on the STS forums.


(Abhishek Nath) #3

So I posted on spring’s forum: http://forum.springsource.org/showthread.php?139449-STS-plugin-is-not-respecting-version-specified-in-gradle-wrapper-and-always-defaultin&p=450048

And as it turns out we have custom location for wrapper.properties and tooling API does not respect that and fall backs on default bundled one. Can we get this resolved?


(Attila Kelemen) #4

Is what you want actually possible? That is: You specify the location of gradle-wrapper.properties in another location and you do this in the build script. So, in order to find out where it is, Gradle needs to execute your build sciprt. But the required Gradle version is defined in gradle-wrapper.properties which is not yet known to Gradle. I don’t think you can expect Gradle to parse shell scripts or a batch file.

If anything, I think changing the location of gradle-wrapper.properties should be a deprected feature.