How to config buildship use enviroment variable like GRADLE_HOME to run gradle in eclipse

buildship
eclipse

(amirhossein) #1

i want chenge “org.eclipse.buildship.core.prefs” this line : connection.gradle.distribution=GRADLE_DISTRIBUTION(LOCAL_INSTALLATION(to/gradle/path))

becuse in this config file i should determine gradle installed bin path ,but i working in developer team and i dont want to determine my gradle absolute path,becuse others team members forced to changes your path or change your gradle installed path according to my config file(after clone the project),and others system might be windos or linux or …,for this reason i want use enviroment variable like GRADLE_HOME to others to be comfortable and just define one enviroment variable for yours gradle and in this config file refer to the GRADLE_HOME and change this line to:
connection.gradle.distribution=GRADLE_DISTRIBUTION(LOCAL_INSTALLATION($GRADLE_HOME))
but not working
how to solve this problem.


(Stefan Oehme) #2

I recommend always using the Gradle wrapper. Using GRADLE_HOME will give you non-reproducible results because it can be different on every machine. The Gradle wrapper ensures everyone uses the same distribution.


(amirhossein) #3

how to set gradle version that use in gradle wrapper? becuse i set version in build.gradle like : task createGradleWrapper(type: Wrapper) {
gradleVersion = '2.6’
scriptFile = ‘GradleJ’ //define a new name for gradle
jarFile = ‘gradle-bin.jar’ //jar with files to download and invoke Gradle
distributionUrl = ‘https://services.gradle.org/distributions/gradle-2.6-bin.zip
}
but graadle wrapper download the another version 2.14
how to fix this problem?