bsideup / jabel

Jabel - unlock Javac 9+ syntax when targeting Java 8
Apache License 2.0
803 stars 47 forks source link

--enable-preview through Jabel? #9

Closed verhas closed 3 years ago

verhas commented 4 years ago

When I use --enable-preview I cannot start the compilation with Jabel. It complains that Java 13 preview features are not possible to use with Java 8 release.

Could Jabel have an option so that it will also tell the compiler to handle the preview features and still generate Java 8 binary?

bsideup commented 4 years ago

Hi @verhas,

Please see the README, it gives an example how to integrate Jabel into your build: https://github.com/bsideup/jabel/blob/master/README.md

When you set release to 8 the compiler will indeed complain that the preview features cannot be used, but you don't need to enable the flag since Jabel removes the preview flag from them.