Hi,
it would be great if someone with more insight could help me understanding the
gwt.dependencies configuration in the BuildConfig.groovy.
As the
documentation states, dependencies declared in the
gwt.dependencies are given to the hosted mode and the GWT compiler so that they can be resolved when needed. The following questions are not yet clear to me:
1) The dependencies need to be available as source for the GWT compiler, so the mechanism apparently resolves the source bundles automatically. Does it use the default Grails dependency mechanism for this (maven repos, local folders, cache)?
2) How does this GWT configuration block relate to the default Grails dependencies configuration block? If I want to use a library in Grails and GWT (ex. Google Guava), is it enough if I declare it in
gwt.dependencies and in the default Grails dependencies, or does the
gwt.dependencies put it implicitly in the project's scope?
3) As I understand it, it does only make sense to specify libs in
gwt.dependencies that are fully compatible with GWT compilation. Otherwise the compilation would fail if a non-GWT-compatible class is used in client code. However, we have a case where we need to put a not fully compatible in the
gwt.dependencies, otherwise the classes could not be resolved. In this concrete case it was the Google guava-gwt library, which also required to put the default Google guava library in the GWT dependencies scope to get rid of a ClassNotFound error.
I would really appreciate if someone could help us understand the GWT plugin dependency resolution a bit better, because GWT dependencies are a constant headache cause in our projects.
Thanks a lot!!
Cheers,
Ben