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 |
|
|
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"/> |
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"/> |
253 |
|
<include name="*.java"/> |
254 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
255 |
|
<compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/> |
256 |
+ |
<compilerarg value="-Xdoclint:reference/private"/> |
257 |
|
<compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/> |
258 |
< |
<compilerarg line="--patch-module java.base=@{classes}" if:set="modules"/> |
258 |
> |
<compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/> |
259 |
|
<compilerarg line="${build.args}"/> |
260 |
|
<javac-elements/> |
261 |
|
|
266 |
|
jvm="${java@{target}}" |
267 |
|
fork="true"> |
268 |
|
<jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/> |
269 |
< |
<jvmarg line="--patch-module java.base=@{classes}" if:set="modules"/> |
270 |
< |
<jvmarg line="--add-opens java.base/java.util=ALL-UNNAMED" if:set="modules"/> |
271 |
< |
<jvmarg line="--add-opens java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/> |
272 |
< |
<jvmarg line="--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/> |
273 |
< |
<jvmarg line="--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/> |
269 |
> |
<jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/> |
270 |
> |
<jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/> |
271 |
> |
<jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/> |
272 |
> |
<jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/> |
273 |
> |
<jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/> |
274 |
> |
<jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/> |
275 |
|
<jvmarg line="@{jvmflags}"/> |
276 |
|
<!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck --> |
277 |
|
<jvmarg line="${vmoptions}" if:set="vmoptions"/> |
401 |
|
fork="true"> |
402 |
|
|
403 |
|
<include name="**/*.java"/> |
404 |
< |
<compilerarg value="-Xmodule:java.base" if:set="modules"/> |
404 |
> |
<compilerarg value="--patch-module=java.base=${src.dir}" if:set="modules"/> |
405 |
|
<compilerarg value="-Xprefer:source"/> |
406 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
407 |
|
<compilerarg value="-Xlint:all"/> |
408 |
|
<compilerarg value="-Werror"/> |
409 |
< |
<compilerarg value="-Xdoclint:all/protected"/> |
409 |
> |
<compilerarg value="-Xdoclint:all/protected,reference/private"/> |
410 |
|
<compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/> |
411 |
|
<compilerarg line="${build.args}"/> |
412 |
|
|
457 |
|
<arg line="-Xdocrootparent ${java9.docroot.url}"/> |
458 |
|
<arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/> |
459 |
|
<arg value="-XDignore.symbol.file=true"/> |
460 |
< |
<arg value="-Xmodule:java.base"/> |
460 |
> |
<arg value="--patch-module=java.base=${src.dir}"/> |
461 |
|
<arg value="-tag"/> |
462 |
|
<arg value="${javadoc.jls.option}"/> |
463 |
|
<!-- @apiNote currently unused --> |
537 |
|
<run-tck-tests |
538 |
|
target="${build.main.java.version}" |
539 |
|
workdir="${build.dir}" |
540 |
< |
classes="${product.jar}"/> |
540 |
> |
classes="${product.jar}"> |
541 |
> |
<javac-elements> |
542 |
> |
<compilerarg value="-Werror"/> |
543 |
> |
</javac-elements> |
544 |
> |
</run-tck-tests> |
545 |
|
</target> |
546 |
|
|
547 |
|
<target name="tck-parallelism-1" |
746 |
|
<compilerarg value="-Xprefer:source"/> |
747 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
748 |
|
<compilerarg value="-Xlint:all"/> |
749 |
< |
<compilerarg value="-Xdoclint:all/protected"/> |
749 |
> |
<compilerarg value="-Xdoclint:all/protected,reference/private"/> |
750 |
|
<compilerarg line="${build.args}"/> |
751 |
|
|
752 |
|
</javac> |
780 |
|
<!-- JDK9+ test classes --> |
781 |
|
<exclude name="*9Test.java"/> |
782 |
|
<exclude name="*10Test.java"/> |
783 |
+ |
<compilerarg value="-Werror"/> |
784 |
|
</javac-elements> |
785 |
|
</run-tck-tests> |
786 |
|
</target> |
962 |
|
<exclude name="SplittableRandomTest.java"/> |
963 |
|
<exclude name="StampedLockTest.java"/> |
964 |
|
<exclude name="SubmissionPublisherTest.java"/> |
965 |
+ |
<compilerarg value="-Werror"/> |
966 |
|
</javac-elements> |
967 |
|
</run-tck-tests> |
968 |
|
</target> |
1517 |
|
</antcall> |
1518 |
|
</target> |
1519 |
|
|
1520 |
+ |
|
1521 |
+ |
<!-- ============================================================== |
1522 |
+ |
Experimental errorprone support - http://errorprone.info |
1523 |
+ |
You may need to bring your own errorprone jar. |
1524 |
+ |
=================================================================== --> |
1525 |
+ |
<target name="errorprone" |
1526 |
+ |
depends="clean, configure-compiler" |
1527 |
+ |
description="Run errorprone over jsr166 source code"> |
1528 |
+ |
|
1529 |
+ |
<local name="destdir"/> |
1530 |
+ |
<property name="destdir" value="${build.classes.dir}/java.base"/> |
1531 |
+ |
<mkdir dir="${destdir}"/> |
1532 |
+ |
|
1533 |
+ |
<javac srcdir="${src.dir}" |
1534 |
+ |
destdir="${destdir}" |
1535 |
+ |
debug="${build.debug}" |
1536 |
+ |
debuglevel="${build.debuglevel}" |
1537 |
+ |
deprecation="${build.deprecation}" |
1538 |
+ |
classpath="" |
1539 |
+ |
includeAntRuntime="false" |
1540 |
+ |
includeJavaRuntime="false" |
1541 |
+ |
encoding="ASCII" |
1542 |
+ |
executable="${build.main.javac}" |
1543 |
+ |
fork="true"> |
1544 |
+ |
|
1545 |
+ |
<include name="**/*.java"/> |
1546 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/> |
1547 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> |
1548 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> |
1549 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> |
1550 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> |
1551 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> |
1552 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> |
1553 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
1554 |
+ |
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
1555 |
+ |
<compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/> |
1556 |
+ |
<compilerarg value="-Xplugin:ErrorProne |
1557 |
+ |
-Xep:IdentityBinaryExpression:WARN |
1558 |
+ |
-Xep:MissingOverride:OFF |
1559 |
+ |
-Xep:MixedArrayDimensions:WARN |
1560 |
+ |
-Xep:RemoveUnusedImports:ERROR |
1561 |
+ |
-Xep:MethodCanBeStatic:WARN"/> |
1562 |
+ |
<compilerarg value="--patch-module=java.base=${src.dir}"/> |
1563 |
+ |
<compilerarg value="-Xprefer:source"/> |
1564 |
+ |
<compilerarg value="-XDignore.symbol.file=true"/> |
1565 |
+ |
<compilerarg value="-Xlint:all"/> |
1566 |
+ |
<compilerarg value="-Xdoclint:all/protected,reference/private"/> |
1567 |
+ |
<compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/> |
1568 |
+ |
<compilerarg line="${build.args}"/> |
1569 |
+ |
</javac> |
1570 |
+ |
|
1571 |
+ |
<jar destfile="${product.jar}"> |
1572 |
+ |
<fileset dir="${destdir}"/> |
1573 |
+ |
</jar> |
1574 |
+ |
|
1575 |
+ |
<run-tck-tests |
1576 |
+ |
target="${build.main.java.version}" |
1577 |
+ |
workdir="${build.dir}" |
1578 |
+ |
classes="${product.jar}"> |
1579 |
+ |
<javac-elements> |
1580 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/> |
1581 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> |
1582 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> |
1583 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> |
1584 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> |
1585 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> |
1586 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> |
1587 |
+ |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
1588 |
+ |
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
1589 |
+ |
<compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/> |
1590 |
+ |
<compilerarg value="-Xplugin:ErrorProne |
1591 |
+ |
-Xep:IdentityBinaryExpression:WARN |
1592 |
+ |
-Xep:BoxedPrimitiveConstructor:OFF |
1593 |
+ |
-Xep:HashtableContains:OFF |
1594 |
+ |
-Xep:ModifyingCollectionWithItself:OFF |
1595 |
+ |
-Xep:MissingOverride:OFF |
1596 |
+ |
-Xep:MixedArrayDimensions:WARN |
1597 |
+ |
-Xep:RemoveUnusedImports:ERROR |
1598 |
+ |
-Xep:MethodCanBeStatic:WARN"/> |
1599 |
+ |
<compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/> |
1600 |
+ |
</javac-elements> |
1601 |
+ |
</run-tck-tests> |
1602 |
+ |
</target> |
1603 |
+ |
|
1604 |
+ |
|
1605 |
|
<!-- ============================================================== |
1606 |
|
Running guava tests against jsr166 code |
1607 |
|
=================================================================== --> |