ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.277 by jsr166, Wed Sep 26 16:11:08 2018 UTC vs.
Revision 1.288 by jsr166, Sat Nov 24 17:39:35 2018 UTC

# Line 1 | Line 1
1   <project name="jsr166" default="usage"
2 <  xmlns:if="ant:if"
2 >  xmlns:if="ant:if"
3    xmlns:unless="ant:unless"
4    xmlns:ivy="antlib:org.apache.ivy.ant">
5  
# Line 55 | Line 55
55  
56  
57    <!-- Compilation options -->
58  <property name="build.sourcelevel"    value="6"/>
58    <property name="build.debug"          value="true"/>
59    <property name="build.debuglevel"     value="source,lines,vars"/>
60    <property name="build.deprecation"    value="false"/>
# Line 204 | Line 203
203    <!-- <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"/>
205    <!-- Default jdk doc location (latest stable release seems best) -->
206 <  <property name="java.docroot.url"   value="${java11.docroot.url}"/>
206 >  <!-- But pin to jdk 10 until fix for -->
207 >  <!-- 8211194: javadoc -link doesn't take module path into consideration -->
208 >  <property name="java.docroot.url"   value="${java10.docroot.url}"/>
209  
210    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
211    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 389 | Line 390
390  
391    <!-- Main targets -->
392  
393 <  <property name="build.main.java.version" value="9"/>
394 <  <!-- Workaround "no nested properties in ant" -->
395 <  <macrodef name="define-build-main-properties">
396 <    <attribute name="v"/>
397 <    <sequential>
398 <      <property name="build.main.java"    value="${java@{v}}"/>
399 <      <property name="build.main.javac"   value="${javac@{v}}"/>
400 <      <!-- Force javadoc version to be at least 10,
400 <           so we can use override-methods=summary -->
401 <      <condition property="build.main.javadoc"
402 <                 value="${javadoc11}"
403 <                 else="${javadoc@{v}}">
404 <        <equals arg1="@{v}" arg2="9"/>
405 <      </condition>
406 <    </sequential>
407 <  </macrodef>
408 <  <define-build-main-properties v="${build.main.java.version}"/>
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"/>
398 >  <property name="build.main.java" value="${java11}"/>
399 >  <property name="build.main.javac" value="${javac9}"/>
400 >  <property name="build.main.javadoc" value="${javadoc12}"/>
401  
402    <target name="dists"
403            depends="dist, 4jdk8dist"
404            description="Builds all public jars and docs"/>
405 <          <!--
414 <              depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
415 <          -->
405 >          <!-- no longer supported: 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist -->
406  
407    <target name="compile"
408            depends="configure-compiler"
# Line 439 | Line 429
429        <compilerarg value="--patch-module=java.base=${src.dir}"/>
430        <compilerarg value="-Xprefer:source"/>
431        <compilerarg value="-XDignore.symbol.file=true"/>
432 <      <compilerarg value="-Xlint:all"/>
432 >      <compilerarg value="-Xlint:all,-removal"/>
433        <compilerarg line="--doclint-format html5"/>
434        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
435        <compilerarg value="-Werror"/>
# Line 481 | Line 471
471   <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
472      <javadoc destdir="${docs.dir}"
473               packagenames="none"
474 <             link="${java9.api.url}"
474 >             link="${java11.api.url}"
475               overview="${src.dir}/intro.html"
476               access="${build.javadoc.access}"
477               sourcepath="${src.dir}"
478               classpath=""
479 <             source="9"
479 >             source="11"
480               executable="${build.main.javadoc}">
481        <fileset dir="${src.dir}" defaultexcludes="yes">
482          <include name="**/*.java"/>
483        </fileset>
484 <      <arg line="-Xdocrootparent ${java9.docroot.url}"/>
484 >      <arg line="-Xdocrootparent ${java10.docroot.url}"/>
485        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
486        <arg value="-XDignore.symbol.file=true"/>
487        <arg value="-html5"/>
488        <arg value="--patch-module=java.base=${src.dir}"/>
489 +      <arg value="--frames"/>
490        <arg value="--override-methods=summary"/>
491        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
492        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
# Line 513 | Line 504
504            description="Puts all distributable products in single hierarchy"/>
505  
506  
516  <target name="release"
517          depends="dist"
518          description="Puts entire CVS tree, plus distribution productions, in a jar">
519
520    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
521
522    <jar basedir="${basedir}" destfile="${release.jar}">
523      <!-- <exclude name="build/**"/> -->
524      <exclude name="${release.jar}"/>
525      <exclude name="user.properties"/>
526      <exclude name="etc/notes/**"/>
527      <exclude name="src/emulation/**"/>
528      <exclude name="**/SyntaxTest.java"/>
529      <exclude name="**/SuperfluousAbstract.java"/>
530      <manifest>
531        <attribute name="Built-By" value="${user.name}"/>
532        <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
533      </manifest>
534    </jar>
535  </target>
536
537
507    <target name="clean"
508            description="Removes all build products">
509      <delete dir="${build.dir}"/>
# Line 606 | Line 575
575            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
576            description="Runs tck and jtreg tests for src/main"/>
577  
578 < <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
579 <
580 < <!--     <antcall target="jtreg"> -->
612 < <!--       <param name="build.main.java.version" value="8"/> -->
613 < <!--       <param name="build.main.javac" value="${javac8}"/> -->
614 < <!--     </antcall> -->
615 <
616 < <!--   </target> -->
617 <
618 <  <target name="test9101112"
619 <          description="Runs tck and jtreg tests for src/main for multiple java versions">
578 >  <target name="test-version-permutations"
579 >          depends="test9, test10, test11, test12, test9-11, test9-12, clean, test, docs">
580 >  </target>
581  
582 +  <target name="test9">
583      <antcall target="clean"/>
584 <    <antcall target="test">
584 >    <antcall>
585        <param name="build.main.java.version" value="9"/>
586 +      <param name="build.main.java" value="${java9}"/>
587 +      <param name="build.main.javac" value="${javac9}"/>
588 +      <target name="test"/>
589      </antcall>
590 +  </target>
591  
592 +  <target name="test10">
593      <antcall target="clean"/>
594 <    <antcall target="test">
594 >    <antcall>
595        <param name="build.main.java.version" value="10"/>
596 +      <param name="build.main.java" value="${java10}"/>
597 +      <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>
602 +  </target>
603  
604 +  <target name="test11">
605      <antcall target="clean"/>
606 <    <antcall target="test">
606 >    <antcall>
607        <param name="build.main.java.version" value="11"/>
608 +      <param name="build.main.java" value="${java11}"/>
609 +      <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>
614 +  </target>
615  
616 +  <target name="test12">
617      <antcall target="clean"/>
618 <    <antcall target="test">
618 >    <antcall>
619        <param name="build.main.java.version" value="12"/>
620 +      <param name="build.main.java" value="${java12}"/>
621 +      <param name="build.main.javac" value="${javac12}"/>
622 +      <param name="build.main.javadoc" value="${javadoc12}"/>
623 +      <target name="test"/>
624 +      <target name="docs"/>
625      </antcall>
626 +  </target>
627  
628 <    <!-- Clean up to avoid obscure wrong class file version bugs -->
628 >  <target name="test9-11">
629      <antcall target="clean"/>
630 <
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>
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">
# Line 665 | Line 670
670    </target>
671  
672  
668
669  <!-- Various demos and test programs -->
670
671
672  <!-- description="Benchmark from Doug Lea's AQS paper" -->
673  <target name="loops" depends="configure-compiler">
674
675    <mkdir dir="${build.loops.dir}"/>
676
677    <javac srcdir="${loops.src.dir}"
678          destdir="${build.loops.dir}"
679            debug="${build.debug}"
680       debuglevel="${build.debuglevel}"
681      deprecation="${build.deprecation}"
682           source="${build.sourcelevel}"
683           target="${build.sourcelevel}"
684         encoding="ASCII"
685             fork="true">
686
687      <compilerarg line="${build.args}"/>
688      <classpath refid="loops.classpath"/>
689      <compilerarg value="-XDignore.symbol.file=true"/>
690
691    </javac>
692
693    <java classname="ALoops" fork="true">
694      <classpath refid="loops.classpath"/>
695    </java>
696  </target>
697
698
673    <target name="compile-test-loops" depends="jar"
674            description="Compiles all the perf tests in src/test/loops">
675  
# Line 1399 | Line 1373
1373  
1374  
1375   <!-- ==============================================================
1376 <  Experimental errorprone support - https://errorprone.info
1376 >  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"/>
1381 >  <path id="errorprone.processorpath.path">
1382 >    <pathelement location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/>
1383 >    <pathelement location="${lib.dir}/dataflow-2.5.7.jar"/>
1384 >    <pathelement location="${lib.dir}/javacutil-2.5.7.jar"/>
1385 >    <pathelement location="${lib.dir}/jFormatString-3.0.0.jar"/>
1386 >  </path>
1387 >  <property name="errorprone.processorpath" refid="errorprone.processorpath.path" />
1388    <property name="errorprone.jsr166.user.flags" value=""/>
1389    <property name="errorprone.jsr166.flags"
1390              value="-Xep:HashtableContains:OFF
1391                     -Xep:JdkObsolete:OFF
1392                     -Xep:MissingOverride:OFF
1393                     -Xep:MissingFail:OFF
1394 +                   -Xep:ThreadPriorityCheck:OFF
1395                     -Xep:MixedArrayDimensions:ERROR
1396                     -Xep:RemoveUnusedImports:ERROR
1397                     -Xep:EmptyIf:ERROR
# Line 1416 | Line 1400
1400                     -Xep:LongLiteralLowerCaseSuffix:ERROR
1401                     -Xep:RedundantThrows:ERROR
1402                     -Xep:IdentityBinaryExpression:WARN
1403 +                   -Xep:ConstructorInvokesOverridable:WARN
1404                     -Xep:MethodCanBeStatic:WARN
1405                     ${errorprone.jsr166.user.flags}"/>
1406    <!-- -Xep:WildcardImport:ERROR -->
# Line 1448 | Line 1433
1433        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1434        <compilerarg value="-J--illegal-access=permit"/>
1435        <compilerarg value="-XDcompilePolicy=simple"/>
1436 <      <compilerarg line="-processorpath ${errorprone.jar}"/>
1436 >      <compilerarg value="-processorpath"/>
1437 >      <compilerarg pathref="errorprone.processorpath.path"/>
1438        <compilerarg value="-Xplugin:ErrorProne
1439                            ${errorprone.jsr166.flags}"/>
1440        <compilerarg value="--patch-module=java.base=${src.dir}"/>
# Line 1472 | Line 1458
1458          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1459          <compilerarg value="-J--illegal-access=permit"/>
1460          <compilerarg value="-XDcompilePolicy=simple"/>
1461 <        <compilerarg line="-processorpath ${errorprone.jar}"/>
1461 >        <compilerarg line="-processorpath ${errorprone.processorpath}"/>
1462          <compilerarg value="-Xplugin:ErrorProne
1463                              ${errorprone.jsr166.flags}
1464                              ${errorprone.jsr166.test.flags}"/>
# Line 1495 | Line 1481
1481        <jtreg-elements>
1482          <arg value="-javacoption:-XDcompilePolicy=simple"/>
1483          <arg value="-javacoption:-processorpath"/>
1484 <        <arg value="-javacoption:${errorprone.jar}"/>
1484 >        <arg value="-javacoption:${errorprone.processorpath}"/>
1485          <arg value="-javacoption:-Xplugin:ErrorProne
1486                              ${errorprone.jsr166.flags}
1487                              ${errorprone.jsr166.test.flags}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines