-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for GWT #140
Add support for GWT #140
Conversation
Hi dojcsak, Thank you for your contribution. I would love to add it to PB, but I guess we need to change it a little bit since I don't want to enforce a runtime dependency to PB classes. Instead I would prefer to handle this case equivalent to the I suggest to add a new element to the For example: @GeneratePojoBuilder(markGwtIncompatible=com.google.gwt.core.shared.GwtIncompatible.class)
public class MyPojo {
...
} The default value of this element would be |
The @GwtIncompatible annotation is a compile time dependency, because the GWT compiler uses it when it translates the source code to JS. The @GeneratePojoBuilder annotation a compile the dependency itself, so there is no runtime dependency on @GwtIncompatible. |
Alright, I will recheck this. |
Hi mkarneim, Thank you for your attention. I agree with elias-adam, @GwtIncompatible is a compile-time dependency. It does not disturb “normal Java” usage. I tested it. I copied @GwtIncompatible, because of GWT recommendation (in @GwtIncompatible Javadoc): “Since only the name of the annotation matters, Java libraries may use their own copy of this annotation class to avoid adding a compile-time dependency on GWT.” I like your suggestion about parameterization and I can implement it, but because of GWT recommendation and @GwtIncompatible does not disturb previous usage I think it is the easiest way to add GWT compatibility. |
5a3d464
to
f0e6ea4
Compare
Alright, that looks good. Thank you for your contribution! |
Thank you for merged! |
Add support for GWT compile.