So I recently made the jump from Ant
to Gradle
and it is wonderful. However, I am having some issues getting gradle to run from a server.
I have a script that I can manually execute to run all of my gradle tasks to build my app. This works perfectly when I am logged into the machine. The problem is that I am now trying to kick off that script for a nightly build. And in order to kill two birds with one stone I launched a JBoss
server with a custom service to call that script nightly and call the script with a specific hooks from GitHub.
Does anyone know what the difference would be between calling the script when I am logged into the machine and having a server (which I started when I was logged in) call the same script?
The only information I get from the console:
gradle: command not found
As say @TobiSH First of all check your environment echo $GRADLE_HOME && echo $PATH
Path to gradle
can be setting up only for your user and not for all system
.profile
or .bashrc
instead of /etc/environment
(for linux systems)
Second option is try to use gradle wrapper
$ gradle wrapper
to be more independent from your environment
You can read more about different user and system variable here (windows)
For ubuntu and other linux based systems here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With