I am trying to run my build script with Java 9-ea+159
I have set:
GRADLE_OPTS=--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED
In my build script I call java.time.LocalDate.now(). This works when I run the script with Java 8. With Java 9, I get the following error:
> No signature of method: static java.time.LocalDate.now() is applicable for argument types: () values: []
Possible solutions: any(), any(groovy.lang.Closure), use([Ljava.lang.Object;), is(java.lang.Object), use(java.util.List, groovy.lang.Closure), use(java.lang.Class, groovy.lang.Closure)
Version details:
$ gradle --version
------------------------------------------------------------
Gradle 3.4.1
------------------------------------------------------------
Build time: 2017-03-03 19:45:41 UTC
Revision: 9eb76efdd3d034dc506c719dac2955efb5ff9a93
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 9-ea (Oracle Corporation 9-ea+159)
OS: Mac OS X 10.12.3 x86_64