/[cvs]/jsr166/build.xml
ViewVC logotype

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.281 by jsr166, Sun Oct 7 03:56:13 2018 UTC revision 1.287 by jsr166, Wed Nov 21 23:21:15 2018 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage"  <project name="jsr166" default="usage"
2    xmlns:if="ant:if"    xmlns:if="ant:if"
3    xmlns:unless="ant:unless"    xmlns:unless="ant:unless"
4    xmlns:ivy="antlib:org.apache.ivy.ant">    xmlns:ivy="antlib:org.apache.ivy.ant">
5    
# Line 55  Line 55 
55    
56    
57    <!-- Compilation options -->    <!-- Compilation options -->
   <property name="build.sourcelevel"    value="6"/>  
58    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
59    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
60    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
# Line 391  Line 390 
390    
391    <!-- Main targets -->    <!-- Main targets -->
392    
393      <!-- Default values: may seem strange ... -->
394      <!-- At runtime, target latest LTS, i.e. jdk11 -->
395      <!-- But at build time, target jdk9, for maximal binary portability -->
396      <!-- Use javadoc12, so we can use override-methods=summary, and JDK-8202628 -->
397    <property name="build.main.java.version" value="11"/>    <property name="build.main.java.version" value="11"/>
398    <!-- Workaround "no nested properties in ant" -->    <property name="build.main.java" value="${java11}"/>
399    <macrodef name="define-build-main-properties">    <property name="build.main.javac" value="${javac9}"/>
400      <attribute name="v"/>    <property name="build.main.javadoc" value="${javadoc12}"/>
     <sequential>  
       <property name="build.main.java"    value="${java@{v}}"/>  
       <property name="build.main.javac"   value="${javac@{v}}"/>  
       <!-- Force javadoc version to be at least 10, so we can use override-methods=summary -->  
       <!-- Force javadoc version to be at least 12, due to JDK-8202628 -->  
       <condition property="build.main.javadoc"  
                  value="${javadoc12}"  
                  else="${javadoc@{v}}">  
         <matches pattern="^(9|10|11)$" string="@{v}"/>  
       </condition>  
     </sequential>  
   </macrodef>  
   <define-build-main-properties v="${build.main.java.version}"/>  
401    
402    <target name="dists"    <target name="dists"
403            depends="dist, 4jdk8dist"            depends="dist, 4jdk8dist"
# Line 439  Line 429 
429        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
430        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
431        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
432        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all,-removal"/>
433        <compilerarg line="--doclint-format html5"/>        <compilerarg line="--doclint-format html5"/>
434        <compilerarg value="-Xdoclint:all/protected,reference/private"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
435        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
# Line 496  Line 486 
486        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
487        <arg value="-html5"/>        <arg value="-html5"/>
488        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
489          <arg value="--frames"/>
490        <arg value="--override-methods=summary"/>        <arg value="--override-methods=summary"/>
491        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
492        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
# Line 513  Line 504 
504            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
505    
506    
   <target name="release"  
           depends="dist"  
           description="Puts entire CVS tree, plus distribution productions, in a jar">  
   
     <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>  
   
     <jar basedir="${basedir}" destfile="${release.jar}">  
       <!-- <exclude name="build/**"/> -->  
       <exclude name="${release.jar}"/>  
       <exclude name="user.properties"/>  
       <exclude name="etc/notes/**"/>  
       <exclude name="src/emulation/**"/>  
       <exclude name="**/SyntaxTest.java"/>  
       <exclude name="**/SuperfluousAbstract.java"/>  
       <manifest>  
         <attribute name="Built-By" value="${user.name}"/>  
         <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>  
       </manifest>  
     </jar>  
   </target>  
   
   
507    <target name="clean"    <target name="clean"
508            description="Removes all build products">            description="Removes all build products">
509      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
# Line 606  Line 575 
575            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
576            description="Runs tck and jtreg tests for src/main"/>            description="Runs tck and jtreg tests for src/main"/>
577    
578  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->    <target name="test-version-permutations"
579              depends="test9, test10, test11, test12, test9-11, test9-12, clean, test, docs">
580  <!--     <antcall target="jtreg"> -->    </target>
 <!--       <param name="build.main.java.version" value="8"/> -->  
 <!--       <param name="build.main.javac" value="${javac8}"/> -->  
 <!--     </antcall> -->  
   
 <!--   </target> -->  
   
   <target name="test9101112"  
           description="Runs tck and jtreg tests for src/main for multiple java versions">  
581    
582      <target name="test9">
583      <antcall target="clean"/>      <antcall target="clean"/>
584      <antcall target="test">      <antcall>
585        <param name="build.main.java.version" value="9"/>        <param name="build.main.java.version" value="9"/>
586        <param name="build.main.java" value="${java9}"/>        <param name="build.main.java" value="${java9}"/>
587        <param name="build.main.javac" value="${javac9}"/>        <param name="build.main.javac" value="${javac9}"/>
588          <target name="test"/>
589      </antcall>      </antcall>
590      </target>
591    
592      <target name="test10">
593      <antcall target="clean"/>      <antcall target="clean"/>
594      <antcall target="test">      <antcall>
595        <param name="build.main.java.version" value="10"/>        <param name="build.main.java.version" value="10"/>
596        <param name="build.main.java" value="${java10}"/>        <param name="build.main.java" value="${java10}"/>
597        <param name="build.main.javac" value="${javac10}"/>        <param name="build.main.javac" value="${javac10}"/>
598          <param name="build.main.javadoc" value="${javadoc10}"/>
599          <target name="test"/>
600          <target name="docs"/>
601      </antcall>      </antcall>
602      </target>
603    
604      <target name="test11">
605      <antcall target="clean"/>      <antcall target="clean"/>
606      <antcall target="test">      <antcall>
607        <param name="build.main.java.version" value="11"/>        <param name="build.main.java.version" value="11"/>
608        <param name="build.main.java" value="${java11}"/>        <param name="build.main.java" value="${java11}"/>
609        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
610          <param name="build.main.javadoc" value="${javadoc11}"/>
611          <target name="test"/>
612          <target name="docs"/>
613      </antcall>      </antcall>
614      </target>
615    
616      <target name="test12">
617      <antcall target="clean"/>      <antcall target="clean"/>
618      <antcall target="test">      <antcall>
       <param name="build.main.java.version" value="12"/>  
       <param name="build.main.java" value="${java12}"/>  
       <param name="build.main.javac" value="${javac12}"/>  
     </antcall>  
     <antcall target="docs">  
619        <param name="build.main.java.version" value="12"/>        <param name="build.main.java.version" value="12"/>
620        <param name="build.main.java" value="${java12}"/>        <param name="build.main.java" value="${java12}"/>
621        <param name="build.main.javac" value="${javac12}"/>        <param name="build.main.javac" value="${javac12}"/>
622        <param name="build.main.javadoc" value="${javadoc12}"/>        <param name="build.main.javadoc" value="${javadoc12}"/>
623          <target name="test"/>
624          <target name="docs"/>
625      </antcall>      </antcall>
626      </target>
627    
628      <!-- Clean up to avoid obscure wrong class file version bugs -->    <target name="test9-11">
629      <antcall target="clean"/>      <antcall target="clean"/>
630        <antcall>
631          <param name="build.main.java.version" value="11"/>
632          <param name="build.main.java" value="${java11}"/>
633          <param name="build.main.javac" value="${javac9}"/>
634          <param name="build.main.javadoc" value="${javadoc11}"/>
635          <target name="test"/>
636          <target name="docs"/>
637        </antcall>
638    </target>    </target>
639    
640      <target name="test9-12">
641        <antcall target="clean"/>
642        <antcall>
643          <param name="build.main.java.version" value="12"/>
644          <param name="build.main.java" value="${java12}"/>
645          <param name="build.main.javac" value="${javac9}"/>
646          <param name="build.main.javadoc" value="${javadoc12}"/>
647          <target name="test"/>
648          <target name="docs"/>
649        </antcall>
650      </target>
651    
652    
653    <target name="configure-compiler">    <target name="configure-compiler">
# Line 679  Line 670 
670    </target>    </target>
671    
672    
   
   <!-- Various demos and test programs -->  
   
   
   <!-- description="Benchmark from Doug Lea's AQS paper" -->  
   <target name="loops" depends="configure-compiler">  
   
     <mkdir dir="${build.loops.dir}"/>  
   
     <javac srcdir="${loops.src.dir}"  
           destdir="${build.loops.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
            target="${build.sourcelevel}"  
          encoding="ASCII"  
              fork="true">  
   
       <compilerarg line="${build.args}"/>  
       <classpath refid="loops.classpath"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
   
     </javac>  
   
     <java classname="ALoops" fork="true">  
       <classpath refid="loops.classpath"/>  
     </java>  
   </target>  
   
   
673    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
674            description="Compiles all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
675    
# Line 1413  Line 1373 
1373    
1374    
1375  <!-- ==============================================================  <!-- ==============================================================
1376    Experimental errorprone support - https://errorprone.info    Experimental errorprone support
1377      https://errorprone.info
1378      https://errorprone.info/docs/installation
1379      https://github.com/google/error-prone/issues/1143
1380  =================================================================== -->  =================================================================== -->
1381    <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.3.1.jar"/>    <property name="errorprone.jar" location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/>
1382      <property name="dataflow.jar" location="${lib.dir}/dataflow-2.5.7.jar"/>
1383      <property name="javacutil.jar" location="${lib.dir}/javacutil-2.5.7.jar"/>
1384      <property name="jFormatString.jar" location="${lib.dir}/jFormatString-3.0.0.jar"/>
1385      <property name="errorprone.processorpath" value="${errorprone.jar}:${jFormatString.jar}:${dataflow.jar}:${javacutil.jar}" />
1386    <property name="errorprone.jsr166.user.flags" value=""/>    <property name="errorprone.jsr166.user.flags" value=""/>
1387    <property name="errorprone.jsr166.flags"    <property name="errorprone.jsr166.flags"
1388              value="-Xep:HashtableContains:OFF              value="-Xep:HashtableContains:OFF
# Line 1430  Line 1397 
1397                     -Xep:LongLiteralLowerCaseSuffix:ERROR                     -Xep:LongLiteralLowerCaseSuffix:ERROR
1398                     -Xep:RedundantThrows:ERROR                     -Xep:RedundantThrows:ERROR
1399                     -Xep:IdentityBinaryExpression:WARN                     -Xep:IdentityBinaryExpression:WARN
1400                       -Xep:ConstructorInvokesOverridable:WARN
1401                     -Xep:MethodCanBeStatic:WARN                     -Xep:MethodCanBeStatic:WARN
1402                     ${errorprone.jsr166.user.flags}"/>                     ${errorprone.jsr166.user.flags}"/>
1403    <!-- -Xep:WildcardImport:ERROR -->    <!-- -Xep:WildcardImport:ERROR -->
# Line 1462  Line 1430 
1430        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1431        <compilerarg value="-J--illegal-access=permit"/>        <compilerarg value="-J--illegal-access=permit"/>
1432        <compilerarg value="-XDcompilePolicy=simple"/>        <compilerarg value="-XDcompilePolicy=simple"/>
1433        <compilerarg line="-processorpath ${errorprone.jar}"/>        <compilerarg line="-processorpath ${errorprone.processorpath}"/>
1434        <compilerarg value="-Xplugin:ErrorProne        <compilerarg value="-Xplugin:ErrorProne
1435                            ${errorprone.jsr166.flags}"/>                            ${errorprone.jsr166.flags}"/>
1436        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
# Line 1486  Line 1454 
1454          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1455          <compilerarg value="-J--illegal-access=permit"/>          <compilerarg value="-J--illegal-access=permit"/>
1456          <compilerarg value="-XDcompilePolicy=simple"/>          <compilerarg value="-XDcompilePolicy=simple"/>
1457          <compilerarg line="-processorpath ${errorprone.jar}"/>          <compilerarg line="-processorpath ${errorprone.processorpath}"/>
1458          <compilerarg value="-Xplugin:ErrorProne          <compilerarg value="-Xplugin:ErrorProne
1459                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1460                              ${errorprone.jsr166.test.flags}"/>                              ${errorprone.jsr166.test.flags}"/>
# Line 1509  Line 1477 
1477        <jtreg-elements>        <jtreg-elements>
1478          <arg value="-javacoption:-XDcompilePolicy=simple"/>          <arg value="-javacoption:-XDcompilePolicy=simple"/>
1479          <arg value="-javacoption:-processorpath"/>          <arg value="-javacoption:-processorpath"/>
1480          <arg value="-javacoption:${errorprone.jar}"/>          <arg value="-javacoption:${errorprone.processorpath}"/>
1481          <arg value="-javacoption:-Xplugin:ErrorProne          <arg value="-javacoption:-Xplugin:ErrorProne
1482                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1483                              ${errorprone.jsr166.test.flags}                              ${errorprone.jsr166.test.flags}

Legend:
Removed from v.1.281  
changed lines
  Added in v.1.287

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27