I have a build.gradle for my Android app and then some helper.gradle files for various sub tasks. Some of these helper tasks invoke shell scripts. Because this app has been in development on exclusively Linux and Mac machines, the shell scripts run fine.
I've recently added a Windows development machine into the mix and the gradle build configuration is failing at calling the shell script.
task helperTask1 << {
exec {
workingDir rootProject.getProjectDir()
commandLine 'sh', './scripts/helperScript1.sh'
}
}
At some point I'll get Cygwin up and running on the Windows machine, but what are my options for getting my app compiling?
- Is there a way to effectively have a helperTask1_Linux and helperTask1_Windows tasks that get called on their respective platforms?
- Is there a more "gradle" way of calling shell scripts so that my gradle files are defining steps at a higher level?