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.235 by jsr166, Sun Mar 19 01:37:51 2017 UTC vs.
Revision 1.236 by jsr166, Mon Mar 20 00:03:57 2017 UTC

# Line 537 | Line 537
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"
# Line 776 | Line 780
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>
# Line 957 | Line 962
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>
# Line 1511 | Line 1517
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   =================================================================== -->

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines