diff options
-rw-r--r-- | build.xml | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -161,7 +161,22 @@ the common tasks and can be called on to run the main aspects of all the sub-scr </ivy:cachedunjar> </target> - <target name="compile" depends="version, ensureBuildDeps, -unpackLibs" description="Compiles the code."> + <target name="-ensureJdk9"> + <condition property="java.version.insufficient"> + <or> + <equals arg1="${ant.java.version}" arg2="1.2" /> + <equals arg1="${ant.java.version}" arg2="1.3" /> + <equals arg1="${ant.java.version}" arg2="1.4" /> + <equals arg1="${ant.java.version}" arg2="1.5" /> + <equals arg1="${ant.java.version}" arg2="1.6" /> + <equals arg1="${ant.java.version}" arg2="1.7" /> + <equals arg1="${ant.java.version}" arg2="1.8" /> + </or> + </condition> + <fail if="java.version.insufficient">To compile lombok, you need JDK9 or higher; lombok requires this version because it's rather difficult to produce lombok builds that are compatible on JDK9 without at least building with JDK9. Sorry about that.</fail> + </target> + + <target name="compile" depends="version, ensureBuildDeps, -unpackLibs, -ensureJdk9" description="Compiles the code."> <!-- ant includes the destination dir on the classpath (and there are good reasons to do this), but that also means the bleeding edge lombok from the previous build is run, which means if there are bugs in it, you can't compile anymore until you 'ant clean'. That's very much not desired, so we kill the processor, which stops lombok from running. |