1 |
<project name="jsr166" default="usage" |
<project name="jsr166" default="usage" |
2 |
xmlns:if="ant:if" xmlns:unless="ant:unless" |
xmlns:if="ant:if" |
3 |
|
xmlns:unless="ant:unless" |
4 |
xmlns:ivy="antlib:org.apache.ivy.ant"> |
xmlns:ivy="antlib:org.apache.ivy.ant"> |
5 |
|
|
6 |
<description> |
<description> |
22 |
$HOME/jdk/jdk8 |
$HOME/jdk/jdk8 |
23 |
$HOME/jdk/jdk9 |
$HOME/jdk/jdk9 |
24 |
$HOME/jdk/jdk10 |
$HOME/jdk/jdk10 |
25 |
|
$HOME/jdk/jdk11 |
26 |
|
$HOME/jdk/jdk12 |
27 |
where each of the above is a JDK or a symlink to same, and |
where each of the above is a JDK or a symlink to same, and |
28 |
$HOME/jdk/src/jdk8 |
$HOME/jdk/src/jdk8 |
29 |
$HOME/jdk/src/jdk9 |
$HOME/jdk/src/jdk9 |
30 |
$HOME/jdk/src/jdk10 |
$HOME/jdk/src/jdk10 |
31 |
|
$HOME/jdk/src/jdk11 |
32 |
|
$HOME/jdk/src/jdk12 |
33 |
where each of the above is a complete JDK source tree |
where each of the above is a complete JDK source tree |
34 |
(e.g. mercurial forest) or a symlink to same. |
(e.g. mercurial forest) or a symlink to same. |
35 |
|
|
55 |
|
|
56 |
|
|
57 |
<!-- Compilation options --> |
<!-- Compilation options --> |
|
<property name="build.sourcelevel" value="6"/> |
|
58 |
<property name="build.debug" value="true"/> |
<property name="build.debug" value="true"/> |
59 |
<property name="build.debuglevel" value="source,lines,vars"/> |
<property name="build.debuglevel" value="source,lines,vars"/> |
60 |
<property name="build.deprecation" value="false"/> |
<property name="build.deprecation" value="false"/> |
105 |
<property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes" |
<property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes" |
106 |
unless:set="have.java.base"/> |
unless:set="have.java.base"/> |
107 |
<local name="modules"/> |
<local name="modules"/> |
108 |
<available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/> |
<available property="modules" file="${jdk@{v}.home}/lib/modules" type="file"/> |
109 |
<local name="boot.jar.dir"/> |
<local name="boot.jar.dir"/> |
110 |
<property name="boot.jar.dir" location="${jdk@{v}.home}/jre/lib" unless:set="modules"/> |
<property name="boot.jar.dir" location="${jdk@{v}.home}/jre/lib" unless:set="modules"/> |
111 |
<path id="bootclasspath@{v}" unless:set="modules"> |
<path id="bootclasspath@{v}" unless:set="modules"> |
136 |
<defjdklocations v="8"/> |
<defjdklocations v="8"/> |
137 |
<defjdklocations v="9"/> |
<defjdklocations v="9"/> |
138 |
<defjdklocations v="10"/> |
<defjdklocations v="10"/> |
139 |
|
<defjdklocations v="11"/> |
140 |
|
<defjdklocations v="12"/> |
141 |
|
|
142 |
<!-- Source locations --> |
<!-- Source locations --> |
143 |
<property name="src.dir" location="${basedir}/src/main"/> |
<property name="src.dir" location="${basedir}/src/main"/> |
148 |
<property name="jtreg8.src.dir" location="${test.src.dir}/jtreg-jdk8"/> |
<property name="jtreg8.src.dir" location="${test.src.dir}/jtreg-jdk8"/> |
149 |
<property name="jtreg9.src.dir" location="${test.src.dir}/jtreg"/> |
<property name="jtreg9.src.dir" location="${test.src.dir}/jtreg"/> |
150 |
<property name="jtreg10.src.dir" location="${test.src.dir}/jtreg"/> |
<property name="jtreg10.src.dir" location="${test.src.dir}/jtreg"/> |
151 |
|
<property name="jtreg11.src.dir" location="${test.src.dir}/jtreg"/> |
152 |
|
<property name="jtreg12.src.dir" location="${test.src.dir}/jtreg"/> |
153 |
<property name="jtreg.src.dir" location="${jtreg9.src.dir}"/> |
<property name="jtreg.src.dir" location="${jtreg9.src.dir}"/> |
154 |
<property name="lib.dir" location="${basedir}/lib"/> |
<property name="lib.dir" location="${basedir}/lib"/> |
155 |
<property name="dist.dir" location="${basedir}/dist"/> |
<property name="dist.dir" location="${basedir}/dist"/> |
189 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
190 |
|
|
191 |
<!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag --> |
<!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag --> |
192 |
<property name="java5.docroot.url" value="http://docs.oracle.com/javase/1.5.0/docs"/> |
<!-- Switched to https: in 2017-10 - JDK-8190312 --> |
193 |
<property name="java6.docroot.url" value="http://docs.oracle.com/javase/6/docs"/> |
<property name="java5.docroot.url" value="https://docs.oracle.com/javase/1.5.0/docs"/> |
194 |
<property name="java7.docroot.url" value="http://docs.oracle.com/javase/7/docs"/> |
<property name="java6.docroot.url" value="https://docs.oracle.com/javase/6/docs"/> |
195 |
<property name="java8.docroot.url" value="http://docs.oracle.com/javase/8/docs"/> |
<property name="java7.docroot.url" value="https://docs.oracle.com/javase/7/docs"/> |
196 |
<!-- The expected canonical location does not yet exist as of 2016-04 --> |
<property name="java8.docroot.url" value="https://docs.oracle.com/javase/8/docs"/> |
197 |
<!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> --> |
<property name="java9.docroot.url" value="https://docs.oracle.com/javase/9/docs"/> |
198 |
<property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> |
<property name="java10.docroot.url" value="https://docs.oracle.com/javase/10/docs"/> |
199 |
|
<property name="java11.docroot.url" value="https://docs.oracle.com/en/java/javase/11/docs"/> |
200 |
|
<!-- The location of jdk early access docs (RIP) --> |
201 |
|
<!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> --> |
202 |
|
<!-- <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/> --> |
203 |
|
<!-- <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/> --> |
204 |
|
<property name="java12.docroot.url" value="https://download.java.net/java/jdk12/docs"/> |
205 |
<!-- Default jdk doc location (latest stable release seems best) --> |
<!-- Default jdk doc location (latest stable release seems best) --> |
206 |
<property name="java.docroot.url" value="${java8.docroot.url}"/> |
<!-- But pin to jdk 10 until fix for --> |
207 |
|
<!-- 8211194: javadoc -link doesn't take module path into consideration --> |
208 |
|
<property name="java.docroot.url" value="${java10.docroot.url}"/> |
209 |
|
|
210 |
<!-- Canonical location of jdk API docs, to use with javadoc link attribute --> |
<!-- Canonical location of jdk API docs, to use with javadoc link attribute --> |
211 |
<property name="java5.api.url" value="${java5.docroot.url}/api/"/> |
<property name="java5.api.url" value="${java5.docroot.url}/api/"/> |
213 |
<property name="java7.api.url" value="${java7.docroot.url}/api/"/> |
<property name="java7.api.url" value="${java7.docroot.url}/api/"/> |
214 |
<property name="java8.api.url" value="${java8.docroot.url}/api/"/> |
<property name="java8.api.url" value="${java8.docroot.url}/api/"/> |
215 |
<property name="java9.api.url" value="${java9.docroot.url}/api/"/> |
<property name="java9.api.url" value="${java9.docroot.url}/api/"/> |
216 |
|
<property name="java10.api.url" value="${java10.docroot.url}/api/"/> |
217 |
|
<property name="java11.api.url" value="${java11.docroot.url}/api/"/> |
218 |
|
<property name="java12.api.url" value="${java12.docroot.url}/api/"/> |
219 |
<property name="java.api.url" value="${java.docroot.url}/api/"/> |
<property name="java.api.url" value="${java.docroot.url}/api/"/> |
220 |
|
|
221 |
<!-- Define the "jtreg" task --> |
<!-- Define the "jtreg" task --> |
248 |
|
|
249 |
<local name="modules"/> |
<local name="modules"/> |
250 |
<condition property="modules"> |
<condition property="modules"> |
251 |
<available file="${jdk@{compile-target}.home}/jmods" type="dir"/> |
<available file="${jdk@{compile-target}.home}/lib/modules" type="file"/> |
252 |
</condition> |
</condition> |
253 |
|
|
254 |
<local name="use-doclint"/> |
<local name="use-doclint"/> |
315 |
</macrodef> |
</macrodef> |
316 |
|
|
317 |
<!-- Define jtreg test sets for different jdk versions --> |
<!-- Define jtreg test sets for different jdk versions --> |
318 |
<fileset dir="${jtreg10.src.dir}"> |
<!-- ant -Djtreg.test.pattern="**/ConcurrentHashMap/" --> |
319 |
<patternset id="jdk10.jtreg.tests"> |
<!-- ant -Djtreg.test.pattern="**/ToArray.java" --> |
320 |
<include name="**/*.java"/> |
<property name="jtreg.test.pattern" value="**/*.java"/> |
321 |
</patternset> |
<macrodef name="defjtregtests"> |
322 |
</fileset> |
<attribute name="v"/> |
323 |
|
<sequential> |
324 |
<fileset dir="${jtreg9.src.dir}"> |
<fileset dir="${jtreg@{v}.src.dir}"> |
325 |
<patternset id="jdk9.jtreg.tests"> |
<patternset id="jdk@{v}.jtreg.tests"> |
326 |
<include name="**/*.java"/> |
<include name="${jtreg.test.pattern}"/> |
327 |
</patternset> |
</patternset> |
328 |
</fileset> |
</fileset> |
329 |
|
</sequential> |
330 |
<fileset dir="${jtreg8.src.dir}"> |
</macrodef> |
|
<patternset id="jdk8.jtreg.tests"> |
|
|
<include name="**/*.java"/> |
|
|
</patternset> |
|
|
</fileset> |
|
331 |
|
|
332 |
<fileset dir="${jtreg7.src.dir}"> |
<defjtregtests v="12"/> |
333 |
<patternset id="jdk7.jtreg.tests"> |
<defjtregtests v="11"/> |
334 |
<include name="**/*.java"/> |
<defjtregtests v="10"/> |
335 |
</patternset> |
<defjtregtests v="9"/> |
336 |
</fileset> |
<defjtregtests v="8"/> |
337 |
|
<defjtregtests v="7"/> |
338 |
|
|
339 |
<!-- ant -Djtreg.flags=-timeoutFactor:4 --> |
<!-- ant -Djtreg.flags=-timeoutFactor:4 --> |
340 |
<property name="jtreg.flags" value=""/> |
<property name="jtreg.flags" value=""/> |
344 |
<attribute name="target"/> |
<attribute name="target"/> |
345 |
<attribute name="workdir"/> |
<attribute name="workdir"/> |
346 |
<attribute name="classes"/> |
<attribute name="classes"/> |
347 |
|
<attribute name="verbose" default="${jtreg.verbose}"/> |
348 |
<attribute name="jtregflags" default=""/> |
<attribute name="jtregflags" default=""/> |
349 |
|
<element name="jtreg-elements" optional="true"/> |
350 |
|
|
351 |
<sequential> |
<sequential> |
352 |
|
|
355 |
|
|
356 |
<local name="modules"/> |
<local name="modules"/> |
357 |
<condition property="modules"> |
<condition property="modules"> |
358 |
<available file="${jdk@{target}.home}/jmods" type="dir"/> |
<available file="${jdk@{target}.home}/lib/modules" type="file"/> |
359 |
</condition> |
</condition> |
360 |
|
|
361 |
<delete dir="@{workdir}/JTwork" quiet="true"/> |
<delete dir="@{workdir}/JTwork" quiet="true"/> |
364 |
workDir="@{workdir}/JTwork"> |
workDir="@{workdir}/JTwork"> |
365 |
<patternset refid="jdk@{target}.jtreg.tests"/> |
<patternset refid="jdk@{target}.jtreg.tests"/> |
366 |
<arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/> |
<arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/> |
367 |
<arg value="-javacoptions:--patch-module java.base=@{classes}" if:set="modules"/> |
<arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/> |
368 |
<arg value="-vmoptions:--patch-module java.base=@{classes}" if:set="modules"/> |
<arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/> |
369 |
<arg value="-agentvm"/> |
<arg value="-agentvm"/> |
370 |
<arg value="-noreport"/> |
<arg value="-noreport"/> |
371 |
<arg value="-verbose:${jtreg.verbose}"/> |
<arg value="-verbose:@{verbose}"/> |
372 |
<arg value="-vmoptions:-esa -ea"/> |
<arg value="-vmoptions:-esa -ea"/> |
373 |
<arg value="-automatic"/> |
<arg value="-automatic"/> |
374 |
<arg value="-k:!ignore"/> |
<arg value="-k:!ignore"/> |
375 |
<arg line="@{jtregflags}"/> |
<arg line="@{jtregflags}"/> |
376 |
<arg line="${jtreg.flags}"/> |
<arg line="${jtreg.flags}"/> |
377 |
|
<jtreg-elements/> |
378 |
</jtreg> |
</jtreg> |
379 |
</sequential> |
</sequential> |
380 |
</macrodef> |
</macrodef> |
390 |
|
|
391 |
<!-- Main targets --> |
<!-- Main targets --> |
392 |
|
|
393 |
<property name="build.main.java.version" value="9"/> |
<!-- Default values: may seem strange ... --> |
394 |
|
<!-- At runtime, target latest LTS, i.e. jdk11 --> |
395 |
|
<!-- But at build time, target jdk9, for maximal binary portability --> |
396 |
|
<!-- Use javadoc12, so we can use override-methods=summary, and JDK-8202628 --> |
397 |
|
<property name="build.main.java.version" value="11"/> |
398 |
|
<property name="build.main.java" value="${java11}"/> |
399 |
<property name="build.main.javac" value="${javac9}"/> |
<property name="build.main.javac" value="${javac9}"/> |
400 |
|
<property name="build.main.javadoc" value="${javadoc12}"/> |
401 |
|
|
402 |
<target name="dists" |
<target name="dists" |
403 |
depends="dist, 4jdk8dist" |
depends="dist, 4jdk8dist" |
404 |
description="Builds all public jars and docs"/> |
description="Builds all public jars and docs"/> |
405 |
<!-- |
<!-- no longer supported: 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist --> |
|
depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist" |
|
|
--> |
|
406 |
|
|
407 |
<target name="compile" |
<target name="compile" |
408 |
depends="configure-compiler" |
depends="configure-compiler" |
409 |
description="Compiles src/main sources to build dir"> |
description="Compiles src/main sources to build dir"> |
410 |
|
|
|
<local name="modules"/> |
|
|
<condition property="modules"> |
|
|
<and> |
|
|
<available file="${jdk9.home}/jmods" type="dir"/> |
|
|
<equals arg1="9" arg2="${build.main.java.version}"/> |
|
|
</and> |
|
|
</condition> |
|
|
|
|
411 |
<local name="destdir"/> |
<local name="destdir"/> |
412 |
<property name="destdir" value="${build.classes.dir}/java.base" if:set="modules"/> |
<property name="destdir" value="${build.classes.dir}/java.base"/> |
|
<property name="destdir" value="${build.classes.dir}" unless:set="modules"/> |
|
413 |
|
|
414 |
<mkdir dir="${destdir}"/> |
<mkdir dir="${destdir}"/> |
415 |
|
|
426 |
fork="true"> |
fork="true"> |
427 |
|
|
428 |
<include name="**/*.java"/> |
<include name="**/*.java"/> |
429 |
<compilerarg value="--patch-module=java.base=${src.dir}" if:set="modules"/> |
<compilerarg value="--patch-module=java.base=${src.dir}"/> |
430 |
<compilerarg value="-Xprefer:source"/> |
<compilerarg value="-Xprefer:source"/> |
431 |
<compilerarg value="-XDignore.symbol.file=true"/> |
<compilerarg value="-XDignore.symbol.file=true"/> |
432 |
<compilerarg value="-Xlint:all"/> |
<compilerarg value="-Xlint:all,-removal"/> |
433 |
<compilerarg line="--doclint-format html5"/> |
<compilerarg line="--doclint-format html5"/> |
434 |
<compilerarg value="-Xdoclint:all/protected,reference/private"/> |
<compilerarg value="-Xdoclint:all/protected,reference/private"/> |
435 |
<compilerarg value="-Werror"/> |
<compilerarg value="-Werror"/> |
471 |
<!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> --> |
<!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> --> |
472 |
<javadoc destdir="${docs.dir}" |
<javadoc destdir="${docs.dir}" |
473 |
packagenames="none" |
packagenames="none" |
474 |
link="${java9.api.url}" |
link="${java11.api.url}" |
475 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
476 |
access="${build.javadoc.access}" |
access="${build.javadoc.access}" |
477 |
sourcepath="${src.dir}" |
sourcepath="${src.dir}" |
478 |
classpath="" |
classpath="" |
479 |
source="9" |
source="11" |
480 |
executable="${javadoc9}"> |
executable="${build.main.javadoc}"> |
481 |
<fileset dir="${src.dir}" defaultexcludes="yes"> |
<fileset dir="${src.dir}" defaultexcludes="yes"> |
482 |
<include name="**/*.java"/> |
<include name="**/*.java"/> |
483 |
</fileset> |
</fileset> |
484 |
<arg line="-Xdocrootparent ${java9.docroot.url}"/> |
<arg line="-Xdocrootparent ${java10.docroot.url}"/> |
485 |
<arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/> |
<arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/> |
486 |
<arg value="-XDignore.symbol.file=true"/> |
<arg value="-XDignore.symbol.file=true"/> |
487 |
<arg value="-html5"/> |
<arg value="-html5"/> |
488 |
<arg value="--patch-module=java.base=${src.dir}"/> |
<arg value="--patch-module=java.base=${src.dir}"/> |
489 |
<arg value="-tag"/> |
<arg value="--frames"/> |
490 |
<arg value="${javadoc.jls.option}"/> |
<arg value="--override-methods=summary"/> |
491 |
<!-- @apiNote currently unused --> |
<arg value="-tag"/> <arg value="${javadoc.jls.option}"/> |
492 |
<!-- <arg value="-tag"/> --> |
<arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/> |
493 |
<!-- <arg value="apiNote:a:API Note:"/> --> |
<arg value="-tag"/> <arg value="implNote:a:Implementation Note:"/> |
494 |
<arg value="-tag"/> |
<arg value="-tag"/> <arg value="apiNote:a:API Note:"/> |
|
<arg value="implSpec:a:Implementation Requirements:"/> |
|
|
<arg value="-tag"/> |
|
|
<arg value="implNote:a:Implementation Note:"/> |
|
495 |
<!-- tags added in jdk9: currently unused --> |
<!-- tags added in jdk9: currently unused --> |
496 |
<!-- <arg value="-tag"/> --> |
<!-- <arg value="-tag"/> <arg value="revised:X"/> --> |
497 |
<!-- <arg value="revised:X"/> --> |
<!-- <arg value="-tag"/> <arg value="spec:X"/> --> |
|
<!-- <arg value="-tag"/> --> |
|
|
<!-- <arg value="spec:X"/> --> |
|
498 |
</javadoc> |
</javadoc> |
499 |
</target> |
</target> |
500 |
|
|
504 |
description="Puts all distributable products in single hierarchy"/> |
description="Puts all distributable products in single hierarchy"/> |
505 |
|
|
506 |
|
|
|
<target name="release" |
|
|
depends="dist" |
|
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
|
|
|
|
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
|
|
|
|
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
|
|
<!-- <exclude name="build/**"/> --> |
|
|
<exclude name="${release.jar}"/> |
|
|
<exclude name="user.properties"/> |
|
|
<exclude name="etc/notes/**"/> |
|
|
<exclude name="src/emulation/**"/> |
|
|
<exclude name="**/SyntaxTest.java"/> |
|
|
<exclude name="**/SuperfluousAbstract.java"/> |
|
|
<manifest> |
|
|
<attribute name="Built-By" value="${user.name}"/> |
|
|
<attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/> |
|
|
</manifest> |
|
|
</jar> |
|
|
</target> |
|
|
|
|
|
|
|
507 |
<target name="clean" |
<target name="clean" |
508 |
description="Removes all build products"> |
description="Removes all build products"> |
509 |
<delete dir="${build.dir}"/> |
<delete dir="${build.dir}"/> |
575 |
depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg" |
depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg" |
576 |
description="Runs tck and jtreg tests for src/main"/> |
description="Runs tck and jtreg tests for src/main"/> |
577 |
|
|
578 |
<!-- <target name="jtreg8" description="Runs jtreg tests with jdk8"> --> |
<target name="test-version-permutations" |
579 |
|
depends="test9, test10, test11, test12, test9-11, test9-12, clean, test, docs"> |
580 |
<!-- <antcall target="jtreg"> --> |
</target> |
|
<!-- <param name="build.main.java.version" value="8"/> --> |
|
|
<!-- <param name="build.main.javac" value="${javac8}"/> --> |
|
|
<!-- </antcall> --> |
|
581 |
|
|
582 |
<!-- </target> --> |
<target name="test9"> |
583 |
|
<antcall target="clean"/> |
584 |
|
<antcall> |
585 |
|
<param name="build.main.java.version" value="9"/> |
586 |
|
<param name="build.main.java" value="${java9}"/> |
587 |
|
<param name="build.main.javac" value="${javac9}"/> |
588 |
|
<target name="test"/> |
589 |
|
</antcall> |
590 |
|
</target> |
591 |
|
|
592 |
<!-- <target name="test89" --> |
<target name="test10"> |
593 |
<!-- description="Runs tck and jtreg tests for src/main for multiple java versions"> --> |
<antcall target="clean"/> |
594 |
|
<antcall> |
595 |
|
<param name="build.main.java.version" value="10"/> |
596 |
|
<param name="build.main.java" value="${java10}"/> |
597 |
|
<param name="build.main.javac" value="${javac10}"/> |
598 |
|
<param name="build.main.javadoc" value="${javadoc10}"/> |
599 |
|
<target name="test"/> |
600 |
|
<target name="docs"/> |
601 |
|
</antcall> |
602 |
|
</target> |
603 |
|
|
604 |
<!-- <antcall target="clean"/> --> |
<target name="test11"> |
605 |
<!-- <antcall target="test"> --> |
<antcall target="clean"/> |
606 |
<!-- <param name="build.main.java.version" value="8"/> --> |
<antcall> |
607 |
<!-- <param name="build.main.javac" value="${javac8}"/> --> |
<param name="build.main.java.version" value="11"/> |
608 |
<!-- </antcall> --> |
<param name="build.main.java" value="${java11}"/> |
609 |
|
<param name="build.main.javac" value="${javac11}"/> |
610 |
|
<param name="build.main.javadoc" value="${javadoc11}"/> |
611 |
|
<target name="test"/> |
612 |
|
<target name="docs"/> |
613 |
|
</antcall> |
614 |
|
</target> |
615 |
|
|
616 |
<!-- <antcall target="clean"/> --> |
<target name="test12"> |
617 |
<!-- <antcall target="test"> --> |
<antcall target="clean"/> |
618 |
<!-- <param name="build.main.java.version" value="9"/> --> |
<antcall> |
619 |
<!-- <param name="build.main.javac" value="${javac9}"/> --> |
<param name="build.main.java.version" value="12"/> |
620 |
<!-- </antcall> --> |
<param name="build.main.java" value="${java12}"/> |
621 |
|
<param name="build.main.javac" value="${javac12}"/> |
622 |
|
<param name="build.main.javadoc" value="${javadoc12}"/> |
623 |
|
<target name="test"/> |
624 |
|
<target name="docs"/> |
625 |
|
</antcall> |
626 |
|
</target> |
627 |
|
|
628 |
<!-- </target> --> |
<target name="test9-11"> |
629 |
|
<antcall target="clean"/> |
630 |
|
<antcall> |
631 |
|
<param name="build.main.java.version" value="11"/> |
632 |
|
<param name="build.main.java" value="${java11}"/> |
633 |
|
<param name="build.main.javac" value="${javac9}"/> |
634 |
|
<param name="build.main.javadoc" value="${javadoc11}"/> |
635 |
|
<target name="test"/> |
636 |
|
<target name="docs"/> |
637 |
|
</antcall> |
638 |
|
</target> |
639 |
|
|
640 |
|
<target name="test9-12"> |
641 |
|
<antcall target="clean"/> |
642 |
|
<antcall> |
643 |
|
<param name="build.main.java.version" value="12"/> |
644 |
|
<param name="build.main.java" value="${java12}"/> |
645 |
|
<param name="build.main.javac" value="${javac9}"/> |
646 |
|
<param name="build.main.javadoc" value="${javadoc12}"/> |
647 |
|
<target name="test"/> |
648 |
|
<target name="docs"/> |
649 |
|
</antcall> |
650 |
|
</target> |
651 |
|
|
652 |
|
|
653 |
<target name="configure-compiler"> |
<target name="configure-compiler"> |
670 |
</target> |
</target> |
671 |
|
|
672 |
|
|
|
|
|
|
<!-- Various demos and test programs --> |
|
|
|
|
|
|
|
|
<!-- description="Benchmark from Doug Lea's AQS paper" --> |
|
|
<target name="loops" depends="configure-compiler"> |
|
|
|
|
|
<mkdir dir="${build.loops.dir}"/> |
|
|
|
|
|
<javac srcdir="${loops.src.dir}" |
|
|
destdir="${build.loops.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="${build.sourcelevel}" |
|
|
target="${build.sourcelevel}" |
|
|
encoding="ASCII" |
|
|
fork="true"> |
|
|
|
|
|
<compilerarg line="${build.args}"/> |
|
|
<classpath refid="loops.classpath"/> |
|
|
<compilerarg value="-XDignore.symbol.file=true"/> |
|
|
|
|
|
</javac> |
|
|
|
|
|
<java classname="ALoops" fork="true"> |
|
|
<classpath refid="loops.classpath"/> |
|
|
</java> |
|
|
</target> |
|
|
|
|
|
|
|
673 |
<target name="compile-test-loops" depends="jar" |
<target name="compile-test-loops" depends="jar" |
674 |
description="Compiles all the perf tests in src/test/loops"> |
description="Compiles all the perf tests in src/test/loops"> |
675 |
|
|
683 |
includeAntRuntime="false" |
includeAntRuntime="false" |
684 |
includeJavaRuntime="false" |
includeJavaRuntime="false" |
685 |
encoding="ASCII" |
encoding="ASCII" |
686 |
executable="${javac9}" |
executable="${build.main.javac}" |
687 |
fork="true"> |
fork="true"> |
688 |
|
|
689 |
<include name="*.java"/> |
<include name="*.java"/> |
824 |
</fileset> |
</fileset> |
825 |
<arg line="-Xdocrootparent ${java8.docroot.url}"/> |
<arg line="-Xdocrootparent ${java8.docroot.url}"/> |
826 |
<arg value="-XDignore.symbol.file=true"/> |
<arg value="-XDignore.symbol.file=true"/> |
827 |
<arg value="-tag"/> |
<arg value="-tag"/> <arg value="${javadoc.jls.option}"/> |
828 |
<arg value="${javadoc.jls.option}"/> |
<arg value="-tag"/> <arg value="implSpec:a:<em>Implementation Requirements:</em>"/> |
829 |
<!-- @apiNote currently unused --> |
<arg value="-tag"/> <arg value="implNote:a:<em>Implementation Note:</em>"/> |
830 |
<!-- <arg value="-tag"/> --> |
<!-- @apiNote tag currently unused --> |
831 |
<!-- <arg value="apiNote:a:<em>API Note:</em>"/> --> |
<!-- <arg value="-tag"/> <arg value="apiNote:a:<em>API Note:</em>"/> --> |
|
<arg value="-tag"/> |
|
|
<arg value="implSpec:a:<em>Implementation Requirements:</em>"/> |
|
|
<arg value="-tag"/> |
|
|
<arg value="implNote:a:<em>Implementation Note:</em>"/> |
|
832 |
</javadoc> |
</javadoc> |
833 |
</target> |
</target> |
834 |
|
|
1358 |
|
|
1359 |
<!-- Find buglets that can be detected by static build tools --> |
<!-- Find buglets that can be detected by static build tools --> |
1360 |
|
|
1361 |
<target name="lint"> |
<!-- <target name="lint"> --> |
1362 |
<antcall target="dists"> |
<!-- <antcall target="dists"> --> |
1363 |
<param name="build.javadoc.access" value="public"/> |
<!-- <param name="build.javadoc.access" value="protected"/> --> |
1364 |
</antcall> |
<!-- </antcall> --> |
1365 |
</target> |
<!-- </target> --> |
1366 |
|
|
1367 |
<!-- Generates all doclint warnings, even for private methods (rarely useful) --> |
<!-- Generates all doclint warnings, even for private methods (rarely useful) --> |
1368 |
<target name="lint-private"> |
<target name="doclint-private"> |
1369 |
<antcall target="dist"> |
<antcall target="dist"> |
1370 |
<param name="build.javadoc.access" value="private"/> |
<param name="build.javadoc.access" value="private"/> |
1371 |
</antcall> |
</antcall> |
1373 |
|
|
1374 |
|
|
1375 |
<!-- ============================================================== |
<!-- ============================================================== |
1376 |
Experimental errorprone support - http://errorprone.info |
Experimental errorprone support |
1377 |
You may need to bring your own errorprone jar. |
https://errorprone.info |
1378 |
|
https://errorprone.info/docs/installation |
1379 |
|
https://github.com/google/error-prone/issues/1143 |
1380 |
=================================================================== --> |
=================================================================== --> |
1381 |
|
<property name="errorprone.jar" location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/> |
1382 |
|
<property name="dataflow.jar" location="${lib.dir}/dataflow-2.5.7.jar"/> |
1383 |
|
<property name="javacutil.jar" location="${lib.dir}/javacutil-2.5.7.jar"/> |
1384 |
|
<property name="jFormatString.jar" location="${lib.dir}/jFormatString-3.0.0.jar"/> |
1385 |
|
<property name="errorprone.processorpath" value="${errorprone.jar}:${jFormatString.jar}:${dataflow.jar}:${javacutil.jar}" /> |
1386 |
|
<property name="errorprone.jsr166.user.flags" value=""/> |
1387 |
|
<property name="errorprone.jsr166.flags" |
1388 |
|
value="-Xep:HashtableContains:OFF |
1389 |
|
-Xep:JdkObsolete:OFF |
1390 |
|
-Xep:MissingOverride:OFF |
1391 |
|
-Xep:MissingFail:OFF |
1392 |
|
-Xep:MixedArrayDimensions:ERROR |
1393 |
|
-Xep:RemoveUnusedImports:ERROR |
1394 |
|
-Xep:EmptyIf:ERROR |
1395 |
|
-Xep:MultipleTopLevelClasses:ERROR |
1396 |
|
-Xep:ClassName:ERROR |
1397 |
|
-Xep:LongLiteralLowerCaseSuffix:ERROR |
1398 |
|
-Xep:RedundantThrows:ERROR |
1399 |
|
-Xep:IdentityBinaryExpression:WARN |
1400 |
|
-Xep:ConstructorInvokesOverridable:WARN |
1401 |
|
-Xep:MethodCanBeStatic:WARN |
1402 |
|
${errorprone.jsr166.user.flags}"/> |
1403 |
|
<!-- -Xep:WildcardImport:ERROR --> |
1404 |
|
<property name="errorprone.jsr166.test.flags" |
1405 |
|
value="-Xep:StringSplitter:OFF |
1406 |
|
-Xep:BoxedPrimitiveConstructor:OFF |
1407 |
|
-Xep:ModifyingCollectionWithItself:OFF"/> |
1408 |
|
<!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' --> |
1409 |
<target name="errorprone" |
<target name="errorprone" |
1410 |
depends="clean, configure-compiler" |
depends="clean, configure-compiler" |
1411 |
description="Run errorprone over jsr166 source code (experimental)"> |
description="Run errorprone over jsr166 source code (experimental)"> |
1427 |
fork="true"> |
fork="true"> |
1428 |
|
|
1429 |
<include name="**/*.java"/> |
<include name="**/*.java"/> |
1430 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/> |
<!-- Needed to silence -Xep:FutureReturnValueIgnored --> |
1431 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> |
<compilerarg value="-J--illegal-access=permit"/> |
1432 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> |
<compilerarg value="-XDcompilePolicy=simple"/> |
1433 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> |
<compilerarg line="-processorpath ${errorprone.processorpath}"/> |
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
|
|
<compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/> |
|
1434 |
<compilerarg value="-Xplugin:ErrorProne |
<compilerarg value="-Xplugin:ErrorProne |
1435 |
-Xep:IdentityBinaryExpression:WARN |
${errorprone.jsr166.flags}"/> |
|
-Xep:MissingOverride:OFF |
|
|
-Xep:MixedArrayDimensions:WARN |
|
|
-Xep:RemoveUnusedImports:ERROR |
|
|
-Xep:ClassName:ERROR |
|
|
-Xep:MultipleTopLevelClasses:ERROR |
|
|
-Xep:EmptyIf:ERROR |
|
|
-Xep:LongLiteralLowerCaseSuffix:ERROR |
|
|
-Xep:ArgumentParameterSwap:ERROR |
|
|
-Xep:RedundantThrows:ERROR |
|
|
-Xep:MethodCanBeStatic:WARN"/> |
|
1436 |
<compilerarg value="--patch-module=java.base=${src.dir}"/> |
<compilerarg value="--patch-module=java.base=${src.dir}"/> |
1437 |
<compilerarg value="-Xprefer:source"/> |
<compilerarg value="-Xprefer:source"/> |
1438 |
<compilerarg value="-XDignore.symbol.file=true"/> |
<compilerarg value="-XDignore.symbol.file=true"/> |
1451 |
workdir="${build.dir}" |
workdir="${build.dir}" |
1452 |
classes="${product.jar}"> |
classes="${product.jar}"> |
1453 |
<javac-elements> |
<javac-elements> |
1454 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/> |
<!-- Needed to silence -Xep:FutureReturnValueIgnored --> |
1455 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> |
<compilerarg value="-J--illegal-access=permit"/> |
1456 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> |
<compilerarg value="-XDcompilePolicy=simple"/> |
1457 |
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> |
<compilerarg line="-processorpath ${errorprone.processorpath}"/> |
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
|
|
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> |
|
|
<compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/> |
|
1458 |
<compilerarg value="-Xplugin:ErrorProne |
<compilerarg value="-Xplugin:ErrorProne |
1459 |
-Xep:IdentityBinaryExpression:WARN |
${errorprone.jsr166.flags} |
1460 |
-Xep:BoxedPrimitiveConstructor:OFF |
${errorprone.jsr166.test.flags}"/> |
|
-Xep:HashtableContains:OFF |
|
|
-Xep:ModifyingCollectionWithItself:OFF |
|
|
-Xep:MissingOverride:OFF |
|
|
-Xep:MixedArrayDimensions:WARN |
|
|
-Xep:RemoveUnusedImports:ERROR |
|
|
-Xep:ClassName:ERROR |
|
|
-Xep:MultipleTopLevelClasses:ERROR |
|
|
-Xep:EmptyIf:ERROR |
|
|
-Xep:LongLiteralLowerCaseSuffix:ERROR |
|
|
-Xep:ArgumentParameterSwap:ERROR |
|
|
-Xep:RedundantThrows:ERROR |
|
|
-Xep:MethodCanBeStatic:WARN"/> |
|
1461 |
<compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/> |
<compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/> |
1462 |
</javac-elements> |
</javac-elements> |
1463 |
</run-tck-tests> |
</run-tck-tests> |
1464 |
</target> |
</target> |
1465 |
|
|
1466 |
|
<!-- ant -emacs errorprone-jtreg |& grep -EA1 '(warning|error):' --> |
1467 |
|
<!-- -XDcompilePolicy=simple or byfile avoids confusing UnusedImports --> |
1468 |
|
<target name="errorprone-jtreg" |
1469 |
|
depends="jar" |
1470 |
|
description="Run errorprone over jtreg tests (experimental)"> |
1471 |
|
|
1472 |
|
<run-jtreg-tests |
1473 |
|
target="${build.main.java.version}" |
1474 |
|
workdir="${build.dir}" |
1475 |
|
classes="${product.jar}" |
1476 |
|
verbose="all"> |
1477 |
|
<jtreg-elements> |
1478 |
|
<arg value="-javacoption:-XDcompilePolicy=simple"/> |
1479 |
|
<arg value="-javacoption:-processorpath"/> |
1480 |
|
<arg value="-javacoption:${errorprone.processorpath}"/> |
1481 |
|
<arg value="-javacoption:-Xplugin:ErrorProne |
1482 |
|
${errorprone.jsr166.flags} |
1483 |
|
${errorprone.jsr166.test.flags} |
1484 |
|
-Xep:MultipleTopLevelClasses:WARN |
1485 |
|
-Xep:NonAtomicVolatileUpdate:OFF"/> |
1486 |
|
</jtreg-elements> |
1487 |
|
</run-jtreg-tests> |
1488 |
|
</target> |
1489 |
|
|
1490 |
|
|
1491 |
<!-- ============================================================== |
<!-- ============================================================== |
1492 |
Running guava tests against jsr166 code |
Running guava tests against jsr166 code |
1540 |
<get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar" |
<get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar" |
1541 |
dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/> |
dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/> |
1542 |
<junit printsummary="true" showoutput="true" haltonfailure="true" |
<junit printsummary="true" showoutput="true" haltonfailure="true" |
1543 |
jvm="${java9}" fork="true"> |
jvm="${build.main.java}" fork="true"> |
1544 |
<jvmarg line="-ea -esa --patch-module java.base=${product.jar}"/> |
<jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/> |
1545 |
<formatter type="brief"/> |
<formatter type="brief"/> |
1546 |
<classpath> |
<classpath> |
1547 |
<pathelement location="${guava.dir}/guava-testlib-tests.jar"/> |
<pathelement location="${guava.dir}/guava-testlib-tests.jar"/> |