I'm trying to set "org.gradle.java.home" property in gradle.properties file to run my Gradle project on Java 8 while the rest of my system uses Java 7. Hence, JAVA_HOME is pointing to JDK 7 and not 8.
The problem is that I can't hardcode it to the properties file because other developers might have a different path or version of Java 8. So, I wanted to use an environment variable in the properties file like this:
org.gradle.java.home=MY_PROJECT_GRADLE_JAVA_HOME
That didn't work.
Does anybody know how can I use environment variables in gradle.properties or has another solution?