Gradle Scripts
Scott Palmer
swpalmer at gmail.com
Tue May 27 15:56:59 UTC 2014
I know the wiki says only Gradle 1.8 is "guaranteed to work" so I have to ask:
Why not use the Gradle Wrapper to force use of 1.8?
http://www.gradle.org/docs/current/userguide/gradle_wrapper.html
Well, I tried tweaking the build scripts to use it myself, running on
OS X and found that the scripts appear to be badly broken anyway and
they can't even be parsed with later Gradle versions so you can't even
run the wrapper task:
The error is:
Could not find method 'defineProperty() for arguments
[MACOSX_MIN_VERSION, 10.7] on root project .....
Sure enough the defineProperty method is being called from a different
.gradle file than the one in which it is defined, so it is out of
scope. I corrected this locally by changing it to a closure and
assigning it to project.ext.defineProperty. Then I added:
task wrapper(type: Wrapper) {
gradleVersion = 1.8'
}
and was able to get the gradlew script created by running:
gradle wrapper
So then I tried to build with Gradle 1.8 by running:
./gradlew
Then I hit :verifyJava complaining that the build number (13) was too
low (< 115)... but I'm building the 8u5 code with the 8u5 release...
that seems like a combination that should work.
I think everyone (myself included) would be more inclined to help with
patches if it wasn't such a pain to build. I appreciate that prior to
the use of Gradle this was likely much worse. Gradle is a great build
system and should be able to make this an even simpler process.
On Windows for what I assume are historical reasons, Cygwin is
expected. I'm only trying to build the Java side of things.. not the
native DLLs and I don't see Cygwin doing anything of value in the
build scripts for that case. It's mangling paths that don't need to
be mangle for example.
I think the build scripts could be cleaned up to provide a much
smoother build experience for those outside of Oracle.
No doubt you guys simply don't have the cycles to burn on fixing build
scripts that are currently working for you.. but I suspect it will pay
off in the long run. The current version of Gradle, 1.12, is the last
1.x Gradle release before the 2.x versions appear. It may make sense
to achieve compatibility with it. Gradle 2.x is expected to break
things, but once things are working with 1.12, then you can work on
getting rid of the warnings and you will be in a much better position.
Cheers,
Scott
More information about the openjfx-dev
mailing list