I have the line def branch = file('..').name
in build.gradle. Running 'gradle' on build 140 Jdk-9 - runs fine JDK-9 Jigsaw gets * What went wrong: A problem occurred evaluating root project 'dir'. > No such property: name for class: java.io.File To run on Jigsaw, I also need to set _JAVA_OPTIONS to include --add-exports-private=java.base/java.lang=ALL-UNNAMED --add-exports-private=java.base/java.util=ALL-UNNAMED