I have a Gradle build that I want to be able to run in command line and Eclipse. In the build I have a line like this:
String versionNum = new File(‘version’).text
which reads the version of the software that is used for build. This works for when I run it in command line, but when I run from under Eclipse it can’t find the file. I printed the default path from gradle script under eclipse and it is the path where my eclipse is installed, not where the gradle script is located.
How do I go about that - either changing the default path for build in Eclipse or using the location of the gradle script inside of gradle somehow.