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

Diff of /jsr166/build.xml

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

revision 1.278 by jsr166, Mon Oct 1 00:10:52 2018 UTC revision 1.292 by jsr166, Thu Dec 13 01:12:01 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 203  Line 202 
202    <!-- <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/> -->    <!-- <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/> -->
203    <!-- <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/> -->    <!-- <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/> -->
204    <property name="java12.docroot.url" value="https://download.java.net/java/jdk12/docs"/>    <property name="java12.docroot.url" value="https://download.java.net/java/jdk12/docs"/>
205    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable LTS release seems best) -->
206    <property name="java.docroot.url"   value="${java11.docroot.url}"/>    <property name="java.docroot.url"   value="${java11.docroot.url}"/>
207    
208    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
# Line 339  Line 338 
338    <property name="jtreg.flags" value=""/>    <property name="jtreg.flags" value=""/>
339    
340    <macrodef name="run-jtreg-tests">    <macrodef name="run-jtreg-tests">
341      <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->      <!-- ant -Djtreg11.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
342      <attribute name="target"/>      <attribute name="target"/>
343      <attribute name="workdir"/>      <attribute name="workdir"/>
344      <attribute name="classes"/>      <attribute name="classes"/>
# Line 389  Line 388 
388    
389    <!-- Main targets -->    <!-- Main targets -->
390    
391    <property name="build.main.java.version" value="11"/>    <!-- Default values: may seem strange ... -->
392    <!-- Workaround "no nested properties in ant" -->    <!-- At runtime, target latest LTS, i.e. jdk11 -->
393    <macrodef name="define-build-main-properties">    <!-- But at build time, target jdk9, for maximal binary portability -->
394      <attribute name="v"/>    <!-- Use javadoc12 (but -link to jdk11 api docs!), to get:
395      <sequential>      o override-methods=summary
396        <property name="build.main.java"    value="${java@{v}}"/>      o {@systemProperty ...}
397        <property name="build.main.javac"   value="${javac@{v}}"/>      o 8211194: issues linking to external documentation (was: missing package-list for JDK10 / JDK11 documentation)
398        <!-- Force javadoc version to be at least 10,      o 8202628: javadoc generates bad links in TestModules.java
399             so we can use override-methods=summary -->      -->
400        <condition property="build.main.javadoc"    <property name="java.runtime.target" value="11"/>
401                   value="${javadoc11}"    <property name="build.main.java" value="${java11}"/>
402                   else="${javadoc@{v}}">    <property name="build.main.javac" value="${javac9}"/>
403          <equals arg1="@{v}" arg2="9"/>    <property name="build.main.javadoc" value="${javadoc12}"/>
404        </condition>    <property name="build.main.javadoc.source" value="${java.runtime.target}"/>
     </sequential>  
   </macrodef>  
   <define-build-main-properties v="${build.main.java.version}"/>  
405    
406    <target name="dists"    <target name="dists"
407            depends="dist, 4jdk8dist"            depends="dist, 4jdk8dist"
408            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
409            <!--            <!-- no longer supported: 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist -->
               depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"  
           -->  
410    
411    <target name="compile"    <target name="compile"
412            depends="configure-compiler"            depends="configure-compiler"
# Line 439  Line 433 
433        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
434        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
435        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
436        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all,-removal"/>
437        <compilerarg line="--doclint-format html5"/>        <compilerarg line="--doclint-format html5"/>
438        <compilerarg value="-Xdoclint:all/protected,reference/private"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
439        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
# Line 481  Line 475 
475  <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->  <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
476      <javadoc destdir="${docs.dir}"      <javadoc destdir="${docs.dir}"
477               packagenames="none"               packagenames="none"
478               link="${java10.api.url}"               link="${java.api.url}"
479               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
480               access="${build.javadoc.access}"               access="${build.javadoc.access}"
481               sourcepath="${src.dir}"               sourcepath="${src.dir}"
482               classpath=""               classpath=""
483               source="11"               source="${build.main.javadoc.source}"
484               executable="${build.main.javadoc}">               executable="${build.main.javadoc}">
485    <!-- TODO: JDK-8214571 failonerror = "true" -->
486        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
487          <include name="**/*.java"/>          <include name="**/*.java"/>
488        </fileset>        </fileset>
489        <arg line="-Xdocrootparent ${java10.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
490        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
491        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
492        <arg value="-html5"/>        <arg value="-html5"/>
493        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
494    <!-- old school frames via docs/index.html?overview-summary.html -->
495          <arg value="--frames"/>
496        <arg value="--override-methods=summary"/>        <arg value="--override-methods=summary"/>
497        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
498        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
# Line 513  Line 510 
510            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
511    
512    
   <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>  
   
   
513    <target name="clean"    <target name="clean"
514            description="Removes all build products">            description="Removes all build products">
515      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
# Line 563  Line 538 
538            description="Runs tck tests for src/main directly">            description="Runs tck tests for src/main directly">
539    
540      <run-tck-tests      <run-tck-tests
541        target="${build.main.java.version}"        target="${java.runtime.target}"
542        workdir="${build.dir}"        workdir="${build.dir}"
543        classes="${product.jar}">        classes="${product.jar}">
544        <javac-elements>        <javac-elements>
# Line 597  Line 572 
572            depends="jar"            depends="jar"
573            description="Runs jtreg tests for src/main using the jtreg ant task">            description="Runs jtreg tests for src/main using the jtreg ant task">
574      <run-jtreg-tests      <run-jtreg-tests
575         target="${build.main.java.version}"         target="${java.runtime.target}"
576         workdir="${build.dir}"         workdir="${build.dir}"
577         classes="${product.jar}"/>         classes="${product.jar}"/>
578    </target>    </target>
# Line 606  Line 581 
581            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
582            description="Runs tck and jtreg tests for src/main"/>            description="Runs tck and jtreg tests for src/main"/>
583    
584  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->    <target name="test-version-permutations"
585              depends="test9, test10, test11, test12, test9-11, test9-12, clean, test, docs">
586  <!--     <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">  
587    
588      <target name="test9">
589      <antcall target="clean"/>      <antcall target="clean"/>
590      <antcall target="test">      <antcall>
591        <param name="build.main.java.version" value="9"/>        <param name="java.runtime.target" value="9"/>
       <param name="build.main.java" value="${java9}"/>  
592        <param name="build.main.javac" value="${javac9}"/>        <param name="build.main.javac" value="${javac9}"/>
593          <param name="build.main.javadoc" value="${javadoc12}"/>
594          <param name="build.main.javadoc.source" value="9"/>
595          <target name="test"/>
596          <target name="docs"/>
597      </antcall>      </antcall>
598      </target>
599    
600      <target name="test10">
601      <antcall target="clean"/>      <antcall target="clean"/>
602      <antcall target="test">      <antcall>
603        <param name="build.main.java.version" value="10"/>        <param name="java.runtime.target" value="10"/>
       <param name="build.main.java" value="${java10}"/>  
604        <param name="build.main.javac" value="${javac10}"/>        <param name="build.main.javac" value="${javac10}"/>
605          <param name="build.main.javadoc" value="${javadoc12}"/>
606          <param name="build.main.javadoc.source" value="10"/>
607          <target name="test"/>
608          <target name="docs"/>
609      </antcall>      </antcall>
610      </target>
611    
612      <target name="test11">
613      <antcall target="clean"/>      <antcall target="clean"/>
614      <antcall target="test">      <antcall>
615        <param name="build.main.java.version" value="11"/>        <param name="java.runtime.target" value="11"/>
       <param name="build.main.java" value="${java11}"/>  
616        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
617          <param name="build.main.javadoc" value="${javadoc12}"/>
618          <param name="build.main.javadoc.source" value="11"/>
619          <target name="test"/>
620          <target name="docs"/>
621      </antcall>      </antcall>
622      </target>
623    
624      <target name="test12">
625      <antcall target="clean"/>      <antcall target="clean"/>
626      <antcall target="test">      <antcall>
627        <param name="build.main.java.version" value="12"/>        <param name="java.runtime.target" value="12"/>
       <param name="build.main.java" value="${java12}"/>  
       <param name="build.main.javac" value="${javac12}"/>  
     </antcall>  
     <antcall target="docs">  
       <param name="build.main.java.version" value="12"/>  
       <param name="build.main.java" value="${java12}"/>  
628        <param name="build.main.javac" value="${javac12}"/>        <param name="build.main.javac" value="${javac12}"/>
629        <param name="build.main.javadoc" value="${javadoc12}"/>        <param name="build.main.javadoc" value="${javadoc12}"/>
630          <param name="build.main.javadoc.source" value="12"/>
631          <target name="test"/>
632          <target name="docs"/>
633      </antcall>      </antcall>
634      </target>
635    
636      <!-- Clean up to avoid obscure wrong class file version bugs -->    <target name="test9-11">
637      <antcall target="clean"/>      <antcall target="clean"/>
638        <antcall>
639          <param name="java.runtime.target" value="11"/>
640          <param name="build.main.javac" value="${javac9}"/>
641          <param name="build.main.javadoc" value="${javadoc12}"/>
642          <param name="build.main.javadoc.source" value="9"/>
643          <target name="test"/>
644          <target name="docs"/>
645        </antcall>
646    </target>    </target>
647    
648      <target name="test9-12">
649        <antcall target="clean"/>
650        <antcall>
651          <param name="java.runtime.target" value="12"/>
652          <param name="build.main.javac" value="${javac9}"/>
653          <param name="build.main.javadoc" value="${javadoc12}"/>
654          <param name="build.main.javadoc.source" value="9"/>
655          <target name="test"/>
656          <target name="docs"/>
657        </antcall>
658      </target>
659    
660    
661    <target name="configure-compiler">    <target name="configure-compiler">
# Line 679  Line 678 
678    </target>    </target>
679    
680    
   
   <!-- 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>  
   
   
681    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
682            description="Compiles all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
683    
# Line 1413  Line 1381 
1381    
1382    
1383  <!-- ==============================================================  <!-- ==============================================================
1384    Experimental errorprone support - https://errorprone.info    Experimental errorprone support
1385      https://errorprone.info
1386      https://errorprone.info/docs/installation
1387      https://github.com/google/error-prone/issues/1143
1388  =================================================================== -->  =================================================================== -->
1389    <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.3.1.jar"/>    <path id="errorprone.processorpath.path">
1390        <pathelement location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/>
1391        <pathelement location="${lib.dir}/dataflow-2.5.7.jar"/>
1392        <pathelement location="${lib.dir}/javacutil-2.5.7.jar"/>
1393        <pathelement location="${lib.dir}/jFormatString-3.0.0.jar"/>
1394      </path>
1395      <property name="errorprone.processorpath" refid="errorprone.processorpath.path" />
1396    <property name="errorprone.jsr166.user.flags" value=""/>    <property name="errorprone.jsr166.user.flags" value=""/>
1397    <property name="errorprone.jsr166.flags"    <property name="errorprone.jsr166.flags"
1398              value="-Xep:HashtableContains:OFF              value="-Xep:HashtableContains:OFF
1399                     -Xep:JdkObsolete:OFF                     -Xep:JdkObsolete:OFF
1400                     -Xep:MissingOverride:OFF                     -Xep:MissingOverride:OFF
1401                     -Xep:MissingFail:OFF                     -Xep:MissingFail:OFF
1402                       -Xep:ThreadPriorityCheck:OFF
1403                     -Xep:MixedArrayDimensions:ERROR                     -Xep:MixedArrayDimensions:ERROR
1404                     -Xep:RemoveUnusedImports:ERROR                     -Xep:RemoveUnusedImports:ERROR
1405                     -Xep:EmptyIf:ERROR                     -Xep:EmptyIf:ERROR
# Line 1430  Line 1408 
1408                     -Xep:LongLiteralLowerCaseSuffix:ERROR                     -Xep:LongLiteralLowerCaseSuffix:ERROR
1409                     -Xep:RedundantThrows:ERROR                     -Xep:RedundantThrows:ERROR
1410                     -Xep:IdentityBinaryExpression:WARN                     -Xep:IdentityBinaryExpression:WARN
1411                       -Xep:ConstructorInvokesOverridable:WARN
1412                     -Xep:MethodCanBeStatic:WARN                     -Xep:MethodCanBeStatic:WARN
1413                     ${errorprone.jsr166.user.flags}"/>                     ${errorprone.jsr166.user.flags}"/>
1414    <!-- -Xep:WildcardImport:ERROR -->    <!-- -Xep:WildcardImport:ERROR -->
# Line 1462  Line 1441 
1441        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1442        <compilerarg value="-J--illegal-access=permit"/>        <compilerarg value="-J--illegal-access=permit"/>
1443        <compilerarg value="-XDcompilePolicy=simple"/>        <compilerarg value="-XDcompilePolicy=simple"/>
1444        <compilerarg line="-processorpath ${errorprone.jar}"/>        <compilerarg value="-processorpath"/>
1445          <compilerarg pathref="errorprone.processorpath.path"/>
1446        <compilerarg value="-Xplugin:ErrorProne        <compilerarg value="-Xplugin:ErrorProne
1447                            ${errorprone.jsr166.flags}"/>                            ${errorprone.jsr166.flags}"/>
1448        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
# Line 1479  Line 1459 
1459      </jar>      </jar>
1460    
1461      <run-tck-tests      <run-tck-tests
1462        target="${build.main.java.version}"        target="${java.runtime.target}"
1463        workdir="${build.dir}"        workdir="${build.dir}"
1464        classes="${product.jar}">        classes="${product.jar}">
1465        <javac-elements>        <javac-elements>
1466          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1467          <compilerarg value="-J--illegal-access=permit"/>          <compilerarg value="-J--illegal-access=permit"/>
1468          <compilerarg value="-XDcompilePolicy=simple"/>          <compilerarg value="-XDcompilePolicy=simple"/>
1469          <compilerarg line="-processorpath ${errorprone.jar}"/>          <compilerarg line="-processorpath ${errorprone.processorpath}"/>
1470          <compilerarg value="-Xplugin:ErrorProne          <compilerarg value="-Xplugin:ErrorProne
1471                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1472                              ${errorprone.jsr166.test.flags}"/>                              ${errorprone.jsr166.test.flags}"/>
# Line 1502  Line 1482 
1482            description="Run errorprone over jtreg tests (experimental)">            description="Run errorprone over jtreg tests (experimental)">
1483    
1484      <run-jtreg-tests      <run-jtreg-tests
1485         target="${build.main.java.version}"         target="${java.runtime.target}"
1486         workdir="${build.dir}"         workdir="${build.dir}"
1487         classes="${product.jar}"         classes="${product.jar}"
1488         verbose="all">         verbose="all">
1489        <jtreg-elements>        <jtreg-elements>
1490          <arg value="-javacoption:-XDcompilePolicy=simple"/>          <arg value="-javacoption:-XDcompilePolicy=simple"/>
1491          <arg value="-javacoption:-processorpath"/>          <arg value="-javacoption:-processorpath"/>
1492          <arg value="-javacoption:${errorprone.jar}"/>          <arg value="-javacoption:${errorprone.processorpath}"/>
1493          <arg value="-javacoption:-Xplugin:ErrorProne          <arg value="-javacoption:-Xplugin:ErrorProne
1494                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1495                              ${errorprone.jsr166.test.flags}                              ${errorprone.jsr166.test.flags}

Legend:
Removed from v.1.278  
changed lines
  Added in v.1.292

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