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.239 by dl, Sun Mar 26 10:40:29 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 366 | Line 372
372    <property name="build.main.javac" value="${javac9}"/>
373  
374    <target name="dists"
375 <          depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
375 >          <!--
376 >              depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
377 >          -->
378 >          depends="dist, 4jdk8dist"
379            description="Builds all public jars and docs"/>
380  
381    <target name="compile"
# Line 400 | Line 409
409             fork="true">
410  
411        <include name="**/*.java"/>
412 <      <compilerarg value="-Xmodule:java.base" if:set="modules"/>
412 >      <compilerarg value="--patch-module=java.base=${src.dir}" if:set="modules"/>
413        <compilerarg value="-Xprefer:source"/>
414        <compilerarg value="-XDignore.symbol.file=true"/>
415        <compilerarg value="-Xlint:all"/>
416        <compilerarg value="-Werror"/>
417 <      <compilerarg value="-Xdoclint:all/protected"/>
417 >      <compilerarg value="-Xdoclint:all/protected,reference/private"/>
418        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
419        <compilerarg line="${build.args}"/>
420  
# Line 456 | Line 465
465        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
466        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
467        <arg value="-XDignore.symbol.file=true"/>
468 <      <arg value="-Xmodule:java.base"/>
468 >      <arg value="--patch-module=java.base=${src.dir}"/>
469        <arg value="-tag"/>
470        <arg value="${javadoc.jls.option}"/>
471   <!-- @apiNote currently unused -->
# Line 536 | Line 545
545      <run-tck-tests
546        target="${build.main.java.version}"
547        workdir="${build.dir}"
548 <      classes="${product.jar}"/>
548 >      classes="${product.jar}">
549 >      <javac-elements>
550 >        <compilerarg value="-Werror"/>
551 >      </javac-elements>
552 >    </run-tck-tests>
553    </target>
554  
555    <target name="tck-parallelism-1"
# Line 604 | Line 617
617  
618    <target name="configure-compiler">
619      <fail message="ant version too old">
620 <      <condition>
608 <        <not> <antversion atleast="1.9.1"/> </not>
609 <      </condition>
620 >      <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
621      </fail>
622  
623      <property name="unchecked.option" value="-Xlint:unchecked"/>
# Line 741 | Line 752
752        <compilerarg value="-Xprefer:source"/>
753        <compilerarg value="-XDignore.symbol.file=true"/>
754        <compilerarg value="-Xlint:all"/>
755 <      <compilerarg value="-Xdoclint:all/protected"/>
755 >      <compilerarg value="-Xdoclint:all/protected,reference/private"/>
756        <compilerarg line="${build.args}"/>
757  
758      </javac>
# Line 775 | Line 786
786          <!-- JDK9+ test classes -->
787          <exclude name="*9Test.java"/>
788          <exclude name="*10Test.java"/>
789 +        <compilerarg value="-Werror"/>
790        </javac-elements>
791      </run-tck-tests>
792    </target>
# Line 956 | Line 968
968          <exclude name="SplittableRandomTest.java"/>
969          <exclude name="StampedLockTest.java"/>
970          <exclude name="SubmissionPublisherTest.java"/>
971 +        <compilerarg value="-Werror"/>
972        </javac-elements>
973      </run-tck-tests>
974    </target>
# Line 1510 | Line 1523
1523      </antcall>
1524    </target>
1525  
1526 +
1527 + <!-- ==============================================================
1528 +  Experimental errorprone support - http://errorprone.info
1529 +  You may need to bring your own errorprone jar.
1530 + =================================================================== -->
1531 +  <target name="errorprone"
1532 +          depends="clean, configure-compiler"
1533 +          description="Run errorprone over jsr166 source code">
1534 +
1535 +    <local name="destdir"/>
1536 +    <property name="destdir" value="${build.classes.dir}/java.base"/>
1537 +    <mkdir dir="${destdir}"/>
1538 +
1539 +    <javac srcdir="${src.dir}"
1540 +           destdir="${destdir}"
1541 +           debug="${build.debug}"
1542 +           debuglevel="${build.debuglevel}"
1543 +           deprecation="${build.deprecation}"
1544 +           classpath=""
1545 +           includeAntRuntime="false"
1546 +           includeJavaRuntime="false"
1547 +           encoding="ASCII"
1548 +           executable="${build.main.javac}"
1549 +           fork="true">
1550 +
1551 +      <include name="**/*.java"/>
1552 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
1553 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
1554 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>
1555 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
1556 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
1557 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>
1558 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
1559 +      <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1560 +      <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1561 +      <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>
1562 +      <compilerarg value="-Xplugin:ErrorProne
1563 +                          -Xep:IdentityBinaryExpression:WARN
1564 +                          -Xep:MissingOverride:OFF
1565 +                          -Xep:MixedArrayDimensions:WARN
1566 +                          -Xep:RemoveUnusedImports:ERROR
1567 +                          -Xep:MethodCanBeStatic:WARN"/>
1568 +      <compilerarg value="--patch-module=java.base=${src.dir}"/>
1569 +      <compilerarg value="-Xprefer:source"/>
1570 +      <compilerarg value="-XDignore.symbol.file=true"/>
1571 +      <compilerarg value="-Xlint:all"/>
1572 +      <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1573 +      <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1574 +      <compilerarg line="${build.args}"/>
1575 +    </javac>
1576 +
1577 +    <jar destfile="${product.jar}">
1578 +      <fileset dir="${destdir}"/>
1579 +    </jar>
1580 +
1581 +    <run-tck-tests
1582 +      target="${build.main.java.version}"
1583 +      workdir="${build.dir}"
1584 +      classes="${product.jar}">
1585 +      <javac-elements>
1586 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
1587 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
1588 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>
1589 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
1590 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
1591 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>
1592 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
1593 +        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1594 +        <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>
1595 +        <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>
1596 +        <compilerarg value="-Xplugin:ErrorProne
1597 +                            -Xep:IdentityBinaryExpression:WARN
1598 +                            -Xep:BoxedPrimitiveConstructor:OFF
1599 +                            -Xep:HashtableContains:OFF
1600 +                            -Xep:ModifyingCollectionWithItself:OFF
1601 +                            -Xep:MissingOverride:OFF
1602 +                            -Xep:MixedArrayDimensions:WARN
1603 +                            -Xep:RemoveUnusedImports:ERROR
1604 +                            -Xep:MethodCanBeStatic:WARN"/>
1605 +        <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1606 +      </javac-elements>
1607 +    </run-tck-tests>
1608 +  </target>
1609 +
1610 +
1611   <!-- ==============================================================
1612    Running guava tests against jsr166 code
1613   =================================================================== -->

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines