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

Diff of /jsr166/build.xml

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

revision 1.282 by jsr166, Tue Oct 9 01:34:19 2018 UTC revision 1.290 by jsr166, Sun Dec 2 22:46:53 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    <!-- But pin to jdk 10 until fix for -->    <property name="java.docroot.url"   value="${java11.docroot.url}"/>
   <!-- 8211194: javadoc -link doesn't take module path into consideration -->  
   <property name="java.docroot.url"   value="${java10.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 -->
209    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 391  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, so we can use override-methods=summary -->      o 8202628: javadoc generates bad links in TestModules.java
399        <!-- Force javadoc version to be at least 12, due to JDK-8202628 -->      -->
400        <condition property="build.main.javadoc"    <property name="java.runtime.target" value="11"/>
401                   value="${javadoc12}"    <property name="build.main.java" value="${java11}"/>
402                   else="${javadoc@{v}}">    <property name="build.main.javac" value="${javac9}"/>
403          <matches pattern="^(9|10|11)$" string="@{v}"/>    <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"
# 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="${java11.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        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
486          <include name="**/*.java"/>          <include name="**/*.java"/>
487        </fileset>        </fileset>
488        <arg line="-Xdocrootparent ${java10.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
489        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
490        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
491        <arg value="-html5"/>        <arg value="-html5"/>
492        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
493    <!-- old school frames via docs/index.html?overview-summary.html -->
494        <arg value="--frames"/>        <arg value="--frames"/>
495        <arg value="--override-methods=summary"/>        <arg value="--override-methods=summary"/>
496        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
# Line 514  Line 509 
509            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
510    
511    
   <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>  
   
   
512    <target name="clean"    <target name="clean"
513            description="Removes all build products">            description="Removes all build products">
514      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
# Line 564  Line 537 
537            description="Runs tck tests for src/main directly">            description="Runs tck tests for src/main directly">
538    
539      <run-tck-tests      <run-tck-tests
540        target="${build.main.java.version}"        target="${java.runtime.target}"
541        workdir="${build.dir}"        workdir="${build.dir}"
542        classes="${product.jar}">        classes="${product.jar}">
543        <javac-elements>        <javac-elements>
# Line 598  Line 571 
571            depends="jar"            depends="jar"
572            description="Runs jtreg tests for src/main using the jtreg ant task">            description="Runs jtreg tests for src/main using the jtreg ant task">
573      <run-jtreg-tests      <run-jtreg-tests
574         target="${build.main.java.version}"         target="${java.runtime.target}"
575         workdir="${build.dir}"         workdir="${build.dir}"
576         classes="${product.jar}"/>         classes="${product.jar}"/>
577    </target>    </target>
# Line 607  Line 580 
580            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
581            description="Runs tck and jtreg tests for src/main"/>            description="Runs tck and jtreg tests for src/main"/>
582    
583  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->    <target name="test-version-permutations"
584              depends="test9, test10, test11, test12, test9-11, test9-12, clean, test, docs">
585  <!--     <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">  
586    
587      <target name="test9">
588      <antcall target="clean"/>      <antcall target="clean"/>
589      <antcall target="test">      <antcall>
590        <param name="build.main.java.version" value="9"/>        <param name="java.runtime.target" value="9"/>
       <param name="build.main.java" value="${java9}"/>  
591        <param name="build.main.javac" value="${javac9}"/>        <param name="build.main.javac" value="${javac9}"/>
592          <param name="build.main.javadoc" value="${javadoc12}"/>
593          <param name="build.main.javadoc.source" value="9"/>
594          <target name="test"/>
595          <target name="docs"/>
596      </antcall>      </antcall>
597      </target>
598    
599      <target name="test10">
600      <antcall target="clean"/>      <antcall target="clean"/>
601      <antcall target="test">      <antcall>
602        <param name="build.main.java.version" value="10"/>        <param name="java.runtime.target" value="10"/>
       <param name="build.main.java" value="${java10}"/>  
603        <param name="build.main.javac" value="${javac10}"/>        <param name="build.main.javac" value="${javac10}"/>
604          <param name="build.main.javadoc" value="${javadoc12}"/>
605          <param name="build.main.javadoc.source" value="10"/>
606          <target name="test"/>
607          <target name="docs"/>
608      </antcall>      </antcall>
609      </target>
610    
611      <target name="test11">
612      <antcall target="clean"/>      <antcall target="clean"/>
613      <antcall target="test">      <antcall>
614        <param name="build.main.java.version" value="11"/>        <param name="java.runtime.target" value="11"/>
       <param name="build.main.java" value="${java11}"/>  
615        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
616          <param name="build.main.javadoc" value="${javadoc12}"/>
617          <param name="build.main.javadoc.source" value="11"/>
618          <target name="test"/>
619          <target name="docs"/>
620      </antcall>      </antcall>
621      </target>
622    
623      <target name="test12">
624      <antcall target="clean"/>      <antcall target="clean"/>
625      <antcall target="test">      <antcall>
626        <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}"/>  
627        <param name="build.main.javac" value="${javac12}"/>        <param name="build.main.javac" value="${javac12}"/>
628        <param name="build.main.javadoc" value="${javadoc12}"/>        <param name="build.main.javadoc" value="${javadoc12}"/>
629          <param name="build.main.javadoc.source" value="12"/>
630          <target name="test"/>
631          <target name="docs"/>
632      </antcall>      </antcall>
633      </target>
634    
635      <!-- Clean up to avoid obscure wrong class file version bugs -->    <target name="test9-11">
636      <antcall target="clean"/>      <antcall target="clean"/>
637        <antcall>
638          <param name="java.runtime.target" value="11"/>
639          <param name="build.main.javac" value="${javac9}"/>
640          <param name="build.main.javadoc" value="${javadoc12}"/>
641          <param name="build.main.javadoc.source" value="9"/>
642          <target name="test"/>
643          <target name="docs"/>
644        </antcall>
645    </target>    </target>
646    
647      <target name="test9-12">
648        <antcall target="clean"/>
649        <antcall>
650          <param name="java.runtime.target" value="12"/>
651          <param name="build.main.javac" value="${javac9}"/>
652          <param name="build.main.javadoc" value="${javadoc12}"/>
653          <param name="build.main.javadoc.source" value="9"/>
654          <target name="test"/>
655          <target name="docs"/>
656        </antcall>
657      </target>
658    
659    
660    <target name="configure-compiler">    <target name="configure-compiler">
# Line 680  Line 677 
677    </target>    </target>
678    
679    
   
   <!-- 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>  
   
   
680    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
681            description="Compiles all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
682    
# Line 1414  Line 1380 
1380    
1381    
1382  <!-- ==============================================================  <!-- ==============================================================
1383    Experimental errorprone support - https://errorprone.info    Experimental errorprone support
1384      https://errorprone.info
1385      https://errorprone.info/docs/installation
1386      https://github.com/google/error-prone/issues/1143
1387  =================================================================== -->  =================================================================== -->
1388    <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.3.1.jar"/>    <path id="errorprone.processorpath.path">
1389        <pathelement location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/>
1390        <pathelement location="${lib.dir}/dataflow-2.5.7.jar"/>
1391        <pathelement location="${lib.dir}/javacutil-2.5.7.jar"/>
1392        <pathelement location="${lib.dir}/jFormatString-3.0.0.jar"/>
1393      </path>
1394      <property name="errorprone.processorpath" refid="errorprone.processorpath.path" />
1395    <property name="errorprone.jsr166.user.flags" value=""/>    <property name="errorprone.jsr166.user.flags" value=""/>
1396    <property name="errorprone.jsr166.flags"    <property name="errorprone.jsr166.flags"
1397              value="-Xep:HashtableContains:OFF              value="-Xep:HashtableContains:OFF
1398                     -Xep:JdkObsolete:OFF                     -Xep:JdkObsolete:OFF
1399                     -Xep:MissingOverride:OFF                     -Xep:MissingOverride:OFF
1400                     -Xep:MissingFail:OFF                     -Xep:MissingFail:OFF
1401                       -Xep:ThreadPriorityCheck:OFF
1402                     -Xep:MixedArrayDimensions:ERROR                     -Xep:MixedArrayDimensions:ERROR
1403                     -Xep:RemoveUnusedImports:ERROR                     -Xep:RemoveUnusedImports:ERROR
1404                     -Xep:EmptyIf:ERROR                     -Xep:EmptyIf:ERROR
# Line 1431  Line 1407 
1407                     -Xep:LongLiteralLowerCaseSuffix:ERROR                     -Xep:LongLiteralLowerCaseSuffix:ERROR
1408                     -Xep:RedundantThrows:ERROR                     -Xep:RedundantThrows:ERROR
1409                     -Xep:IdentityBinaryExpression:WARN                     -Xep:IdentityBinaryExpression:WARN
1410                       -Xep:ConstructorInvokesOverridable:WARN
1411                     -Xep:MethodCanBeStatic:WARN                     -Xep:MethodCanBeStatic:WARN
1412                     ${errorprone.jsr166.user.flags}"/>                     ${errorprone.jsr166.user.flags}"/>
1413    <!-- -Xep:WildcardImport:ERROR -->    <!-- -Xep:WildcardImport:ERROR -->
# Line 1463  Line 1440 
1440        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1441        <compilerarg value="-J--illegal-access=permit"/>        <compilerarg value="-J--illegal-access=permit"/>
1442        <compilerarg value="-XDcompilePolicy=simple"/>        <compilerarg value="-XDcompilePolicy=simple"/>
1443        <compilerarg line="-processorpath ${errorprone.jar}"/>        <compilerarg value="-processorpath"/>
1444          <compilerarg pathref="errorprone.processorpath.path"/>
1445        <compilerarg value="-Xplugin:ErrorProne        <compilerarg value="-Xplugin:ErrorProne
1446                            ${errorprone.jsr166.flags}"/>                            ${errorprone.jsr166.flags}"/>
1447        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
# Line 1480  Line 1458 
1458      </jar>      </jar>
1459    
1460      <run-tck-tests      <run-tck-tests
1461        target="${build.main.java.version}"        target="${java.runtime.target}"
1462        workdir="${build.dir}"        workdir="${build.dir}"
1463        classes="${product.jar}">        classes="${product.jar}">
1464        <javac-elements>        <javac-elements>
1465          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1466          <compilerarg value="-J--illegal-access=permit"/>          <compilerarg value="-J--illegal-access=permit"/>
1467          <compilerarg value="-XDcompilePolicy=simple"/>          <compilerarg value="-XDcompilePolicy=simple"/>
1468          <compilerarg line="-processorpath ${errorprone.jar}"/>          <compilerarg line="-processorpath ${errorprone.processorpath}"/>
1469          <compilerarg value="-Xplugin:ErrorProne          <compilerarg value="-Xplugin:ErrorProne
1470                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1471                              ${errorprone.jsr166.test.flags}"/>                              ${errorprone.jsr166.test.flags}"/>
# Line 1503  Line 1481 
1481            description="Run errorprone over jtreg tests (experimental)">            description="Run errorprone over jtreg tests (experimental)">
1482    
1483      <run-jtreg-tests      <run-jtreg-tests
1484         target="${build.main.java.version}"         target="${java.runtime.target}"
1485         workdir="${build.dir}"         workdir="${build.dir}"
1486         classes="${product.jar}"         classes="${product.jar}"
1487         verbose="all">         verbose="all">
1488        <jtreg-elements>        <jtreg-elements>
1489          <arg value="-javacoption:-XDcompilePolicy=simple"/>          <arg value="-javacoption:-XDcompilePolicy=simple"/>
1490          <arg value="-javacoption:-processorpath"/>          <arg value="-javacoption:-processorpath"/>
1491          <arg value="-javacoption:${errorprone.jar}"/>          <arg value="-javacoption:${errorprone.processorpath}"/>
1492          <arg value="-javacoption:-Xplugin:ErrorProne          <arg value="-javacoption:-Xplugin:ErrorProne
1493                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1494                              ${errorprone.jsr166.test.flags}                              ${errorprone.jsr166.test.flags}

Legend:
Removed from v.1.282  
changed lines
  Added in v.1.290

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