aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-04-16 22:29:13 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-04-16 22:29:13 +0200
commit7e81ac623831c3147e8fba4ca4ebfa021f4f5bd5 (patch)
tree3acae104e02f5f5cd73fc5a85f9eee743463659c
parent3a8c8cad0a38e767284864f9591e42d84be7643c (diff)
downloadlombok-7e81ac623831c3147e8fba4ca4ebfa021f4f5bd5.tar.gz
lombok-7e81ac623831c3147e8fba4ca4ebfa021f4f5bd5.tar.bz2
lombok-7e81ac623831c3147e8fba4ca4ebfa021f4f5bd5.zip
[build] Trying to build lombok on JDK1.8 or less is not gonna work. Now we generate an error during build to make that more clear. Addresses issue 1659.
-rw-r--r--build.xml17
1 files changed, 16 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 62197da7..384128ea 100644
--- a/build.xml
+++ b/build.xml
@@ -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.