In my GRADLE_HOME/init.d, I have some init scripts. One of them needs to use a groovy script also located in GRADLE_HOME/init.d.
I tried this
GroovyScriptEngine gse = new GroovyScriptEngine(gradle.gradleHomeDir + “/init.d/”)
Class UtilClass = gse.loadScriptByName(“some.groovy”)
But it looks like gradle.gradleHomeDir is not available in init scripts (I get a property missing exception).
I cannot use a environment variable
GroovyScriptEngine gse = new GroovyScriptEngine(System.env.‘GRADLE_HOME’ + “/init.d/”)
When I use the STS plugin on a Mac, it doesn’t workif I use env variables. Something to do with the way Mac launches the apps (it does not source the .bashrc files).
Any other way I can refer to the groovy script from my init scripts?