In shared package i have a class that only uses a class from server package, only when it is on server, it is indepdendant of the GWT, and i have made it transient
if (!GWT.isClient())
ServerLogger loggerServer;
but it does not compile because it is in shared.. Can i worourund in here?, I just want for the GoogleCompile to work, it should not have the functionality of the server logger.
Is there a workaround?
How to write my own module which is NULL overall, because i only want to stop the compiler of erroring.
GWT is still trying to compile this code. You will want to use Deferred Binding and
<super-source>to swap in the implementation you need at compile-time, so that GWT doesn’t try to compile this server-specific code.Either that, or have the
ServerLoggerimplementation be an interface dependency on this shared class, and pass in the correct implementation in server/client: