To reproduce, run the following with gradle 5.0:
$ gradle
...
> Task :buildSrc:compileGroovy
startup failed:
rt/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy: 118: The variable [files] is declared final but is reassigned
. At [118:21] @ line 118, column 21.
files += file;
^
1 error
See https://github.com/javafxports/openjdk-jfx/pull/313 for more a discussion on this first problem.
The build errors with gradle 5 are more extensive than this one failure. Fixing that one problem allows the build to get a little farther, but it still doesn't make it through the configuration phase.