has anyone tried building a gwt application using buck ?

122 views
Skip to first unread message

Debasish Padhy

unread,
Aug 20, 2017, 12:19:47 AM8/20/17
to GWT Users
any  advantages vs. troubles summary ?

any links to guides for setting up ?

Thomas Broyer

unread,
Aug 20, 2017, 8:01:35 AM8/20/17
to GWT Users

On Sunday, August 20, 2017 at 6:19:47 AM UTC+2, Debasish Padhy wrote:
any  advantages vs. troubles summary ?

any links to guides for setting up ?

Even though this is not documented on buckbuild.com, Buck has built-in support for GWT with the gwt_binary rule.
And the rule arguments and their default value in the code: https://github.com/facebook/buck/blob/v2017.05.31.01/src/com/facebook/buck/gwt/GwtBinaryDescription.java, that is:
  • deps needs to list gwt-dev (and all its transitive dependencies, if downloaded from Central with a remote_file rule and a "mvn:" URL; in the test they use a fat-jar gwt-dev.jar, from the GWT SDK, that's directly checked into the repo, you could also achieve something similar with a remote_file with type='exploded_zip' and simple genrule()s that 'cp $(location …) $OUT').
  • module_deps lists java_library rules, and should transitively enclose gwt-user.
  • modules is a list of GWT module names to compile, as you would pass them as arguments to the GWT compiler.
  • local_workers defaults to 2
  • style defaults to 'OBF'
  • strict defaults to False (I recommend setting it to True)

Gerrit was built with Buck for a few years (they now switched to Bazel, though maintenance branches might still be using Buck).
I'm not sure they used Buck's built-in GWT support though, as they started using Buck before it gained support for GWT.

I never actually used Buck, so can't comment about the pros and cons. Apparently there's no support for running SuperDevMode so you'd have to configure it separately, and most probably outside of Buck)

Debasish Padhy

unread,
Aug 20, 2017, 8:37:51 AM8/20/17
to google-we...@googlegroups.com
Many thanks for such a detailed explanation but I am perplexed at your understanding of the subject although you have never used it.

Is bazel ready for gwt building ?

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Per75QiAuCo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Thomas Broyer

unread,
Aug 20, 2017, 2:10:10 PM8/20/17
to GWT Users

On Sunday, August 20, 2017 at 2:37:51 PM UTC+2, Debasish Padhy wrote:
Many thanks for such a detailed explanation but I am perplexed at your understanding of the subject although you have never used it.

I have a (not so) secret interest in build tools ;-)
(see most recent –though already years-old– posts on my blog: http://blog.ltgt.net/ ; I do not need the scalability or versatility of Bazel, Buck or Pants, so my go-to build tool is Gradle these days, if only for its better/easier IDE integration)
 
Is bazel ready for gwt building ?

I'm told it is: https://github.com/bazelbuild/rules_gwt (with dev mode support ;-) )
(written by a former Googler, who btw also created, and still maintains, gwtmockito)

BTW, J2Cl (which will power GWT 3) is designed for use with Bazel (along with https://github.com/bazelbuild/rules_closure)

deba...@ainosoft.com

unread,
Aug 21, 2017, 2:07:14 AM8/21/17
to GWT Users
A much simpler question -

What is the most effective build tool for multi module gwt projects and why ? We are pretty much married to maven at this point :) but the build speed is really a pain and we are contemplating a divorce.. Do you think there is a better option ?

thanks a ton in advance. 

deba...@ainosoft.com

unread,
Aug 21, 2017, 2:24:11 AM8/21/17
to GWT Users
Note - we like the xml of maven compared to json based configuration but will make a switch if significant build speed's can be achieved. 

Thomas Broyer

unread,
Aug 21, 2017, 3:09:34 AM8/21/17
to GWT Users
At least Gradle (and Bazel/Buck/Pants) have truly incremental builds, which Maven likely won't ever have.
Along with non-linear (graph) build lifecycle and other niceties, that makes it "a better option" undoubtedly.

deba...@ainosoft.com

unread,
Aug 21, 2017, 3:54:09 AM8/21/17
to GWT Users
Is there any effort you know for creating a gradle gwt plugin on similar lines to your gwt-maven-plugin ? 

Can you kindly point me to a gwt gradle project sample ? I am always amazed how you find time for this work you do :D ;) and to reply here. :D

Vassilis Virvilis

unread,
Aug 21, 2017, 4:15:27 AM8/21/17
to google-we...@googlegroups.com
Oh my God.

Every time I turn my head the other way there are more of them (build tools).

:-)


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

Thomas Broyer

unread,
Aug 21, 2017, 6:58:18 AM8/21/17
to GWT Users


On Monday, August 21, 2017 at 9:54:09 AM UTC+2, deba...@ainosoft.com wrote:
Is there any effort you know for creating a gradle gwt plugin on similar lines to your gwt-maven-plugin ? 

There's IMO no point in creating a Gradle plugin "on similar lines", because it's so easy to just use a JavaExec task to run GWT, it might actually be a good idea to group client, shared and server code in the same Gradle project, using custom sourceSets (things you simply cannot do with Maven), and creating a GWT library is a 3-liner (there might also be better ways to organize code for shared libraries than with Maven, with a single Gradle project producing 2 JARs; again something simply impossibly with Maven).
(OK, things might actually be slightly different for unit tests)
I personally haven't used any of them because, well, the GWT apps I work on actually use Maven (for… reasons), or are only libraries that are still incubating (e.g. https://github.com/tbroyer/gwt-events)

Can you kindly point me to a gwt gradle project sample ?

I know Putnami has sample projects, and you should be able to find others on GitHub searching for the plugin IDs.

Ignacio Baca Moreno-Torres

unread,
Aug 21, 2017, 8:11:19 AM8/21/17
to GWT Users
This is all I need to compile (actually validate) RxJava (https://github.com/ibaca/RxJava/commit/42372bb989490698b2e4862454ec469635a8f132). Only sourceSets, configurations and the gwtCompile goal is relevant. I think for an app project you will need a bit more because if you want to create a war you should define the outputs of your task, but anyway doing it manually seems to worth it.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages