GWT & Closure library

182 views
Skip to first unread message

Mihai Stanciu

unread,
Nov 17, 2015, 11:36:58 AM11/17/15
to GWT Contributors
Hi

We are looking at using OpenLayers3 js library that is now build using Closure framework.
We will use this in a GWT app using the new JsInterop to map the OpenLayers3 api.
  1. Is it possible to compile the OpenLayers(or any closure library) based on GWT output, or compile the Java and JS together? 
  2. I see there is a closureFormattedOutput what would be the diference between this and enableClosureCompiler?

Thanks 
Mihai

Goktug Gokdogan

unread,
Nov 18, 2015, 1:30:40 AM11/18/15
to google-web-toolkit-contributors
On Tue, Nov 17, 2015 at 8:36 AM, Mihai Stanciu <miha...@gmail.com> wrote:
Hi

We are looking at using OpenLayers3 js library that is now build using Closure framework.
We will use this in a GWT app using the new JsInterop to map the OpenLayers3 api.
  1. Is it possible to compile the OpenLayers(or any closure library) based on GWT output, or compile the Java and JS together? 
You can compile them together but Closure compiler will not do most optimizations as it will be confused with the GWT output.

My recommendation is having two scripts - closure compiled output of the library and GWT compiled output - and use jsinterop to integrate two scripts.
 
  1. I see there is a closureFormattedOutput what would be the diference between this and enableClosureCompiler?

The goal of the closureFormattedOutput to change the output format so it plays better with Closure compiler but it is experimental and very fragile so I don't recommend it. 
enableClosureCompiler just runs Closure compiler backend for additional optimizations, it doesn't have anything to do with integration.


Thanks 
Mihai

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/cf95aa6f-1d2f-41e3-9675-604ebb3496e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages