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}" |
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 value="--patch-module=java.base=@{classes}" if:set="modules"/> |
264 |
|
<compilerarg line="${build.args}"/> |
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 |
|
|
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" |
614 |
|
|
615 |
|
<target name="configure-compiler"> |
616 |
|
<fail message="ant version too old"> |
617 |
< |
<condition> |
608 |
< |
<not> <antversion atleast="1.9.1"/> </not> |
609 |
< |
</condition> |
617 |
> |
<condition> <not> <antversion atleast="1.9.1"/> </not> </condition> |
618 |
|
</fail> |
619 |
|
|
620 |
|
<property name="unchecked.option" value="-Xlint:unchecked"/> |
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> |
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> |
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> |
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 |
|
=================================================================== --> |