Hi all,
I'm switching my code base from TeaVM to GWT+elemental for better Java8 support. It works fine, woehoe! Big thanks to GWT. Nice to be back, I've worked professionally with GWT in 2010, unfortunately I haven't done any GWT projects since.
However I ran the TeaVM compiler programmatically, and I don't succeed running the GWT compiler like that. Now I create a Bladiebla.gwt.xml file, run a process, delete the ..gwt.xml: works but is somewhat cumbersome. I can't create a ModuleDef for my module:
<module rename-to='a'><inherits name='elemental.Elemental'/><entry-point class='" + className + "'/><source path=''/></module>
ModuleDef module = new ModuleDef("a");
// ?? module.addInherits??("elemental.Elemental"); // how to do this?
module.addEntryPointTypeName(className);
module.addResourcePath(""); // correct?
On a side-note: there are probably a 1000 reasons I don't know which are the reason for these .gwt.xml files. but I do prefer the TeaVM approach, where I only have to point out my entrypoint, and that's all, it only compiles whatever code was called. No client/shared/server packages, @GwtIgnore or .gwt.xml files. Might be something to consider, because I guess it's faster to leave out never used classes and methods in the first place. And more beautiful, although that's my opinion.
And now that I'm complaining: I'm missing a plane 'here is the source-folder' argument for the compiler. Now I manually add src/main/java to the existing classpath programatically, works fine, but then again this might later be a reason why I can't succeed in a programmatical approach, even if I simulate the ModuleDef correctly.
Super thanks!
Niels Gorisse
-- I'm switching my code base from TeaVM to GWT+elemental for better Java8 support. It works fine, woehoe! Big thanks to GWT. Nice to be back, I've worked professionally with GWT in 2010, unfortunately I haven't done any GWT projects since.
However I ran the TeaVM compiler programmatically, and I don't succeed running the GWT compiler like that. Now I create a Bladiebla.gwt.xml file, run a process, delete the ..gwt.xml: works but is somewhat cumbersome. I can't create a ModuleDef for my module:
<module rename-to='a'><inherits name='elemental.Elemental'/><entry-point class='" + className + "'/><source path=''/></module>
ModuleDef module = new ModuleDef("a");
// ?? module.addInherits??("elemental.Elemental"); // how to do this?
module.addEntryPointTypeName(className);
module.addResourcePath(""); // correct?
On a side-note: there are probably a 1000 reasons I don't know which are the reason for these .gwt.xml files. but I do prefer the TeaVM approach, where I only have to point out my entrypoint, and that's all, it only compiles whatever code was called. No client/shared/server packages, @GwtIgnore or .gwt.xml files. Might be something to consider, because I guess it's faster to leave out never used classes and methods in the first place. And more beautiful, although that's my opinion.
And now that I'm complaining: I'm missing a plane 'here is the source-folder' argument for the compiler. Now I manually add src/main/java to the existing classpath programatically, works fine, but then again this might later be a reason why I can't succeed in a programmatical approach, even if I simulate the ModuleDef correctly.
Super thanks!
Niels Gorisse
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+unsubscribe@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.
No comments:
Post a Comment