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.232 by jsr166, Wed Feb 1 18:26:31 2017 UTC vs.
Revision 1.238 by jsr166, Fri Mar 24 16:33:02 2017 UTC

# Line 234 | 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 253 | 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 265 | 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.lang=ALL-UNNAMED" if:set="modules"/>
276 <        <jvmarg line="--add-opens java.base/java.util=ALL-UNNAMED" if:set="modules"/>
277 <        <jvmarg line="--add-opens java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
278 <        <jvmarg line="--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
279 <        <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 400 | 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 456 | 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 536 | 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 604 | Line 614
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"/>
# Line 741 | 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 775 | 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 956 | 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 1510 | 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   =================================================================== -->

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines