I'm running android on a Bamboo server hosted on a Mac OS (Yosemite). I have set the path to android_sdk, both in bash_profile and in /etc/path. Checking that:
echo $ANDROID_HOME
> /Applications/Android/sdk
But when running the build I get the following error:
java.lang.RuntimeException: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
My problem is that this will be run from different type of machines, a linux and a MAC OS, so the path might vary. So defining a path in as an Environmental variable is not an alternative, since it might vary for the different operating system. I don't want to create separate builds for different machines.
I also haven't found any alternativ to set the variable as a capability for the bamboo agent, maybe there is?
Any suggestions how to solve this? Can I specify it in gradle somehow? Checking in local.properties is not an alternative.