Using the maven gwt and appengine plugins, is it possible to compile GWT 2.8 in Java 8, and then app engine related files using Java 7? I realize the managed VMs support Java 8, but it would be nice to stick with the app engine environment which currently only support Java 7?
I am wondering if there exists some maven configuration that would first compile all the GWT files in Java 8, thereby converting them to javascript, and then use java 7 for all the server files.
--
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-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/cK12H59iY0Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
You could possibly exclude your client code from being compiled with JavaC, and only processed by GWT.
Alternatives I can think of are:
- use Maven Toolchains to use JDK 7 and JDK 8 in the same build;
- use JDK 8 and retrolambda: https://github.com/orfjackal/retrolambda
- split your code into 2 projects/modules, compiled in 2 phases: mvn install the client code with JDK8, then mvn appengine:update the server code with JDK7, which has a dependency in the client code (resolved from local Maven repo).
The cleaner solution IMO is to use separate JDKs (or proper cross-compilation, with bootclasspath et al); either with toolchains or separate build phases. Retrolambda would need some testing in a Java 7 environment to confirm the transformation went well.
Also, Animal Sniffer on your server code would help, in case you don't compile it with a JDK7.
Thanks as alway for the prompt response. I went ahead and reverted to Java 7 (while still using GWT 2.8) as the quick solution, with Google Guava for some more advanced Java 8 like APIs. After some cursory research, I believe the GAE sandbox will be supporting Java 8 at some point this year, so hopefully the wait won't be too long, at which point I will use Java 8 across the board.I am still going to explore the Toolchains option though. Having more of a clear separation between the client and server may make things easier, at least in my case. If I get it working, I will share the pom. Thanks again for all the GWT support.
On Thu, Mar 10, 2016 at 12:41 AM, Thomas Broyer <t.br...@gmail.com> wrote:
GWT 2.8 should support JDK 7, but if you want to use Java 8 features then indeed you need to use a JDK 8 to JavaC your classes.
You could possibly exclude your client code from being compiled with JavaC, and only processed by GWT.
Alternatives I can think of are:
- use Maven Toolchains to use JDK 7 and JDK 8 in the same build;
- use JDK 8 and retrolambda: https://github.com/orfjackal/retrolambda
- split your code into 2 projects/modules, compiled in 2 phases: mvn install the client code with JDK8, then mvn appengine:update the server code with JDK7, which has a dependency in the client code (resolved from local Maven repo).
The cleaner solution IMO is to use separate JDKs (or proper cross-compilation, with bootclasspath et al); either with toolchains or separate build phases. Retrolambda would need some testing in a Java 7 environment to confirm the transformation went well.
Also, Animal Sniffer on your server code would help, in case you don't compile it with a JDK7.
--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/cK12H59iY0Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.