I'm trying to build a Grails app using Gradle by calling the grails executable directly (instead of using any plugins/wrappers). I'd rather not lose the ability to use BuildConfig.groovy so I figured this would work. It works fine using windows syntax on my machine, but when I try to modify it to work with PMEase QuickBuild on a Linux machine it won't work. Seems that the QuickBuild admin didn't add $GRAILS_HOME/bin to the path on the box and is hesitant to do so because there may be additional versions of Grails installed on the box since it's a shared build server. I tried setting the workingDir in the task and that fails with the non-helpful "Process 'command './grails'' finished with non-zero exit value 1" and no further info.
task buildWAR(type: Exec) {
commandLine './grails', 'dev', 'war', '--debug', '--stacktrace', '--verbose'
standardOutput = new ByteArrayOutputStream()
ext.output = {
return standardOutput.toString()
}
}
So is this possible? If he were to install/use GVM would I be able to somehow integrate a "gvm use" statement in my Gradle script?
Ran the build command directly on the machine and came to the conclusion that it couldn't hit our internal maven repo due to firewall. Migrated dependencies to a repo it could hit and it built the WAR properly.