Scilab build: enable jdk8 build
[scilab.git] / scilab / build.incl.xml
index d9e2be7..f7c40de 100644 (file)
     <target name="init">
         <!-- Check the version of Java. If it changes after the configure
          or if there is a mistake in the build system
-    -->
-        <fail message="JDK 1.6 or 1.7 required. Found ${ant.java.version}">
-            <condition>
-                <not>
-                    <or>
-                        <equals arg1="${ant.java.version}" arg2="1.6"/>
-                        <equals arg1="${ant.java.version}" arg2="1.7"/>
-                    </or>
-                </not>
-            </condition>
-        </fail>
+         Note: all class names are the same as in m4/java.m4
+        -->
+        <available property="jdk1.6+" classname="java.util.ArrayDeque"/>
+        <available property="jdk1.7+" classname="java.nio.file.Path"/>
+        <available property="jdk1.8+" classname="java.util.stream.DoubleStream"/>
+        <fail message="Require JDK 1.6 or higher. Found ${ant.java.version}" unless="jdk1.6+"/>
         <mkdir dir="${classes.dir}"/>
         <mkdir dir="${classes.test.dir}"/>
         <mkdir dir="${build.jar.dir}"/>