JAL-1790 fix: javac.source=1.7 and javac.target=1.7 variables for all javac tasks...
authorJim Procter <jprocter@issues.jalview.org>
Wed, 24 Jun 2015 15:36:48 +0000 (16:36 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 24 Jun 2015 15:36:48 +0000 (16:36 +0100)
build.xml

index dbf1df3..02e8253 100755 (executable)
--- a/build.xml
+++ b/build.xml
     <!-- J2SE version needed for webstart launch -->
     <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
     <property name="j2sev" value="1.7+"/>
-
+       <!-- Java Compilation settings - source and target javac version -->
+       <property name="javac.source" value="1.7"/>
+       <property name="javac.target" value="1.7"/>
+               
     <!-- Permissions for running Java applets and applications. -->
     <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
     <property name="application.codebase" value="*.jalview.org" />
 
   <target name="build" depends="prepare">
     <!-- not efficient yet. -->
-    <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
+    <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
       <exclude name="jalview/*applet*" />
       <exclude name="jalview/appletgui/**" />
       <exclude name="com/stevesoft/**" />
   </target>  
   
   <target name="buildTests" depends="prepareTests">
-       <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${testOutputDir}"
-               debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
-               <exclude name="jalview/*applet*" />
-               <exclude name="jalview/appletgui/**" />
+       <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${testOutputDir}"
+               debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >               
        </javac>
-       <javac source="1.5" target="1.5" srcdir="${testDir}" destdir="${testOutputDir}"
+       <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}"
                debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
        </javac>
   </target>
 
 <target name="compileApplet" depends="init,clean">
   <mkdir dir="${outputDir}" />
-  <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" 
+  <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" 
                        classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
                        excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/ext/paradise/**" />
 </target>