Refactoring JavaFX Builds & Sources
Richard Bair
richard.bair at oracle.com
Fri Oct 19 07:34:20 PDT 2012
> On 10/18/2012 11:16 PM, Richard Bair wrote:
>> In addition to code generation, we also build a ton of native code (gstreamer, webkit, prism, fonts, glass, image loading). So that has to fit into the build system. Building native code is SLOW, so being able to avoid it for "normal" developers, and being able to avoid native builds when nothing changed in the native code, is important.
>
> Building native code may be slow in general, but building e.g. Glass takes under a minute. Of course I agree that if code hasn't changed, it shouldn't be re-built.
>
> One more point: presently we can clone the repository and build just glass itself (which is very fast as I mentioned above). This is useful for quick testing, and also we have a Glass-only demo app that doesn't depend on FX, so we can work on Glass w/o even building the whole FX right now. Can we make the new build system support this kind of partial builds (at least for Glass)?
I don't know that compilation time is actually going to be a problem in practice. I already have the prototype build setup to build all of base, graphics (which is Scene Graph + Prism + Glass), and controls and it only takes a few seconds on my machine, which is saying something, because my machine has a very slow harddrive and chronically long build times. I also expect there will be build targets for only building specific native parts, so you could say something like:
gradle :graphics compile-glass-native
and it would only compile the glass natives. In that case, I think you still have the ability to just clone, compile the natives, and run rain.
> Another point: I see that the ultimate goal is to be able to build from an IDE, and this is fine. However, I think that building from command line should still be supported and not require any more than it requires now (which is basically just `cd to-my-repo && ant`).
Yes, I think that goes without saying. Gradle (and Maven) are fully controllable / usable from the command line.
Cheers
Richard
More information about the openjfx-dev
mailing list