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.229 by jsr166, Tue Dec 20 04:18:46 2016 UTC vs.
Revision 1.238 by jsr166, Fri Mar 24 16:33:02 2017 UTC

# Line 18 | Line 18
18    itself.  Because the JDK version matters and because different
19    targets require different JDKs, we assume that users have created a
20    hierarchy containing:
21  $HOME/jdk/jdk6
21    $HOME/jdk/jdk7
22    $HOME/jdk/jdk8
23    $HOME/jdk/jdk9
24 +  $HOME/jdk/jdk10
25    where each of the above is a JDK or a symlink to same, and
26  $HOME/jdk/src/jdk6
26    $HOME/jdk/src/jdk7
27    $HOME/jdk/src/jdk8
28    $HOME/jdk/src/jdk9
29 +  $HOME/jdk/src/jdk10
30    where each of the above is a complete JDK source tree
31    (e.g. mercurial forest) or a symlink to same.
32  
33    Alternatively, define ant variables thus:
34    ant -Djdk$N.home=... -Djdk$N.src.home=...
35 <  for $N in 6 7 8 9 ...
35 >  for $N in 7 8 9 10 ...
36  
37 <  As of 2016-03, the sources in src/main are for jdk9+ only.  The "docs"
38 <  target is currently broken.
37 >  As of 2016-03, the sources in src/main are for jdk9+ only.
38   ------------------------------------------------------------------------------
39    </description>
40  
# Line 134 | Line 133
133    <defjdklocations v="7"/>
134    <defjdklocations v="8"/>
135    <defjdklocations v="9"/>
136 +  <defjdklocations v="10"/>
137  
138    <!-- Source locations -->
139    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 143 | Line 143
143    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
144    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
145    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
146 +  <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>
147    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
148    <property name="lib.dir"              location="${basedir}/lib"/>
149    <property name="dist.dir"             location="${basedir}/dist"/>
# Line 233 | Line 234
234        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
235      </condition>
236  
237 +    <local name="use-doclint"/>
238 +    <condition property="use-doclint">
239 +      <not> <equals arg1="@{target}" arg2="7"/> </not>
240 +    </condition>
241 +
242      <mkdir dir="@{workdir}/tck-classes"/>
243  
244      <javac srcdir="@{tck.src.dir}"
# Line 252 | Line 258
258        <include name="*.java"/>
259        <compilerarg value="-XDignore.symbol.file=true"/>
260        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
261 +      <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
262        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
263 <      <compilerarg line="--patch-module java.base=@{classes}" if:set="modules"/>
263 >      <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
264        <compilerarg line="${build.args}"/>
265        <javac-elements/>
266  
# Line 264 | Line 271
271            jvm="${java@{target}}"
272            fork="true">
273          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
274 <        <jvmarg line="--patch-module java.base=@{classes}" if:set="modules"/>
275 <        <jvmarg line="--add-opens java.base/java.util=ALL-UNNAMED" if:set="modules"/>
276 <        <jvmarg line="--add-opens java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
277 <        <jvmarg line="--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
278 <        <jvmarg line="--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
274 >        <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
275 >        <jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
276 >        <jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/>
277 >        <jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
278 >        <jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
279 >        <jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
280          <jvmarg line="@{jvmflags}"/>
281          <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
282          <jvmarg line="${vmoptions}" if:set="vmoptions"/>
# Line 398 | Line 406
406             fork="true">
407  
408        <include name="**/*.java"/>
409 <      <compilerarg value="-Xmodule:java.base" if:set="modules"/>
409 >      <compilerarg value="--patch-module=java.base=${src.dir}" if:set="modules"/>
410        <compilerarg value="-Xprefer:source"/>
411        <compilerarg value="-XDignore.symbol.file=true"/>
412        <compilerarg value="-Xlint:all"/>
413        <compilerarg value="-Werror"/>
414 <      <compilerarg value="-Xdoclint:all/protected"/>
414 >      <compilerarg value="-Xdoclint:all/protected,reference/private"/>
415        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
416        <compilerarg line="${build.args}"/>
417  
# Line 454 | Line 462
462        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
463        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
464        <arg value="-XDignore.symbol.file=true"/>
465 <      <arg value="-Xmodule:java.base"/>
465 >      <arg value="--patch-module=java.base=${src.dir}"/>
466        <arg value="-tag"/>
467        <arg value="${javadoc.jls.option}"/>
468   <!-- @apiNote currently unused -->
# Line 534 | Line 542
542      <run-tck-tests
543        target="${build.main.java.version}"
544        workdir="${build.dir}"
545 <      classes="${product.jar}"/>
545 >      classes="${product.jar}">
546 >      <javac-elements>
547 >        <compilerarg value="-Werror"/>
548 >      </javac-elements>
549 >    </run-tck-tests>
550    </target>
551  
552    <target name="tck-parallelism-1"
# Line 602 | Line 614
614  
615    <target name="configure-compiler">
616      <fail message="ant version too old">
617 <      <condition>
606 <        <not> <antversion atleast="1.9.1"/> </not>
607 <      </condition>
617 >      <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
618      </fail>
619  
620      <property name="unchecked.option" value="-Xlint:unchecked"/>
# Line 739 | Line 749
749        <compilerarg value="-Xprefer:source"/>
750        <compilerarg value="-XDignore.symbol.file=true"/>
751        <compilerarg value="-Xlint:all"/>
752 <      <compilerarg value="-Xdoclint:all/protected"/>
752 >      <compilerarg value="-Xdoclint:all/protected,reference/private"/>
753        <compilerarg line="${build.args}"/>
754  
755      </javac>
# Line 773 | Line 783
783          <!-- JDK9+ test classes -->
784          <exclude name="*9Test.java"/>
785          <exclude name="*10Test.java"/>
786 +        <compilerarg value="-Werror"/>
787        </javac-elements>
788      </run-tck-tests>
789    </target>
# Line 954 | Line 965
965          <exclude name="SplittableRandomTest.java"/>
966          <exclude name="StampedLockTest.java"/>
967          <exclude name="SubmissionPublisherTest.java"/>
968 +        <compilerarg value="-Werror"/>
969        </javac-elements>
970      </run-tck-tests>
971    </target>
# Line 1508 | Line 1520
1520      </antcall>
1521    </target>
1522  
1523 +
1524 + <!-- ==============================================================
1525 +  Experimental errorprone support - http://errorprone.info
1526 +  You may need to bring your own errorprone jar.
1527 + =================================================================== -->
1528 +  <target name="errorprone"
1529 +          depends="clean, configure-compiler"
1530 +          description="Run errorprone over jsr166 source code">
1531 +
1532 +    <local name="destdir"/>
1533 +    <property name="destdir" value="${build.classes.dir}/java.base"/>
1534 +    <mkdir dir="${destdir}"/>
1535 +
1536 +    <javac srcdir="${src.dir}"
1537 +           destdir="${destdir}"
1538 +           debug="${build.debug}"
1539 +           debuglevel="${build.debuglevel}"
1540 +           deprecation="${build.deprecation}"
1541 +           classpath=""
1542 +           includeAntRuntime="false"
1543 +           includeJavaRuntime="false"
1544 +           encoding="ASCII"
1545 +           executable="${build.main.javac}"
1546 +           fork="true">
1547 +
1548 +      <include name="**/*.java"/>
1549 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
1550 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
1551 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>
1552 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
1553 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
1554 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>
1555 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
1556 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1557 +      <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1558 +      <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>
1559 +      <compilerarg value="-Xplugin:ErrorProne
1560 +                          -Xep:IdentityBinaryExpression:WARN
1561 +                          -Xep:MissingOverride:OFF
1562 +                          -Xep:MixedArrayDimensions:WARN
1563 +                          -Xep:RemoveUnusedImports:ERROR
1564 +                          -Xep:MethodCanBeStatic:WARN"/>
1565 +      <compilerarg value="--patch-module=java.base=${src.dir}"/>
1566 +      <compilerarg value="-Xprefer:source"/>
1567 +      <compilerarg value="-XDignore.symbol.file=true"/>
1568 +      <compilerarg value="-Xlint:all"/>
1569 +      <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1570 +      <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1571 +      <compilerarg line="${build.args}"/>
1572 +    </javac>
1573 +
1574 +    <jar destfile="${product.jar}">
1575 +      <fileset dir="${destdir}"/>
1576 +    </jar>
1577 +
1578 +    <run-tck-tests
1579 +      target="${build.main.java.version}"
1580 +      workdir="${build.dir}"
1581 +      classes="${product.jar}">
1582 +      <javac-elements>
1583 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
1584 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
1585 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>
1586 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
1587 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
1588 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>
1589 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
1590 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1591 +        <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1592 +        <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>
1593 +        <compilerarg value="-Xplugin:ErrorProne
1594 +                            -Xep:IdentityBinaryExpression:WARN
1595 +                            -Xep:BoxedPrimitiveConstructor:OFF
1596 +                            -Xep:HashtableContains:OFF
1597 +                            -Xep:ModifyingCollectionWithItself:OFF
1598 +                            -Xep:MissingOverride:OFF
1599 +                            -Xep:MixedArrayDimensions:WARN
1600 +                            -Xep:RemoveUnusedImports:ERROR
1601 +                            -Xep:MethodCanBeStatic:WARN"/>
1602 +        <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1603 +      </javac-elements>
1604 +    </run-tck-tests>
1605 +  </target>
1606 +
1607 +
1608   <!-- ==============================================================
1609    Running guava tests against jsr166 code
1610   =================================================================== -->
1611  
1612   <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1613 < <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0-rc1"/> -->
1614 < <!-- <property name="guava.version" value="20.0"/> -->
1613 > <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1614 > <!-- <property name="guava.version" value="21.0"/> -->
1615  
1616   <!-- HOWTO debug print a path id -->
1617   <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
# Line 1556 | Line 1653
1653        type="jar,bundle" inline="true" conf="default,master"
1654        pattern="${guava.dir}/[artifact].[ext]"
1655        organisation="com.google.guava" module="guava-testlib"/>
1656 <    <property name="guava.version" value="21.0-rc1"/>
1656 >    <property name="guava.version" value="21.0"/>
1657      <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1658           dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1659      <junit printsummary="true" showoutput="true" haltonfailure="true"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines