Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use Java annotation processor instead of GWT Generator? #4

Open
metteo opened this issue Apr 14, 2018 · 2 comments
Open

Use Java annotation processor instead of GWT Generator? #4

metteo opened this issue Apr 14, 2018 · 2 comments
Labels

Comments

@metteo
Copy link
Member

metteo commented Apr 14, 2018

GWT Generators are going away in GWT 3 / j2cl. They only way forward is apt. The added benefit of migration would be out of the box support for non GWT projects like Java and Android ones.

However there are sharp alternatives supporting JSR-330:

but some Gin / GWT specific features are not supported by them:

  • GWT-RPC Sync / Async interfaces
  • AsyncProvider interface

More on the issue here: GWT 3 and Gin

Consider either migration to apt or creation of dagger extensions to support GWT specific features.

@metteo
Copy link
Member Author

metteo commented Apr 18, 2018

One option would be an annotation processor which reads Gin DSL and generates Dagger modules and component. The Ginjector could then delegate to Dagger @Component class. GWT extensions could be hidden this way. Unfortunately it would mean that Guice specific syntax would stop working.

@ibaca
Copy link

ibaca commented Apr 19, 2018

FYI

This autorpc-gwt project creates Sync/Async GWT-RPC interfaces, optionally with an RxJava async interface too.

And reactivity which is a dagger + code-splitting sample project. I bit more manual work required, but almost no dependency (no library code) except dagger. I use RxJava but native JS promises (or just a callback) can be used instead to add zero codesize overhead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants