I’m new at gradle. I have read the User’s Guide and either missed some behavior or do not understand something fundamental about gradle. I have several methods defined and several tasks. And everything worked perfectly until I removed some directories that I wanted the build script to create at which time the entire script failed in all respects. The script is fairly large so I will start with examples and then if that does not help i will post the entire script.
I have methods
def isGenerated (siteFile, bMyriad, eMyriad) {
String ttext = siteFile.getText()
return ttext.indexOf(bMyriad) > 0 && ttext.indexOf(eMyriad) > 0
}
task doStuff() {
.....
.....
if (isGenerated(getYarnSiteFile(yhome), "BEGIN", "END")) {
}
}
I’m using gradle 2.3 (was using 2.1) wrapper…if I do
gradlew clean
The output is
Build file ‘/vagrant/build.gradle’ line: 84
- What went wrong:
A problem occurred evaluating root project ‘myriad’.
/usr/local/hadoop/etc/hadoop/yarn-site.xml (No such file or directory)
So the method is being executed on “clean” which is a standard task. In fact the same thing happens no matter what I use as the task.
What am I missing?
Thanks