Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1 | <!-- |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 2 | * © 2016 and later: Unicode, Inc. and others. |
| 3 | * License & terms of use: http://www.unicode.org/copyright.html#License |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 4 | ******************************************************************************* |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 5 | * Copyright (C) 1997-2016, International Business Machines Corporation and * |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 6 | * others. All Rights Reserved. * |
| 7 | ******************************************************************************* |
| 8 | --> |
| 9 | <project name="icu4j" default="jar" basedir="." |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 10 | xmlns:ivy="antlib:org.apache.ivy.ant" |
| 11 | xmlns:jacoco="antlib:org.jacoco.ant"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 12 | |
| 13 | <property file="build-local.properties"/> |
| 14 | <property file="build.properties"/> |
| 15 | |
| 16 | <property name="shared.dir" value="main/shared"/> |
| 17 | <import file="${shared.dir}/build/common-targets.xml"/> |
| 18 | |
| 19 | <property environment="env"/> |
| 20 | |
| 21 | <!-- icu4j binaries --> |
| 22 | <property name="icu4j.jar.file" value="icu4j.jar"/> |
| 23 | <property name="icu4jtests.jar.file" value="icu4jtests.jar"/> |
| 24 | <property name="icu4j-charset.jar.file" value="icu4j-charset.jar"/> |
| 25 | <property name="icu4j-localespi.jar.file" value="icu4j-localespi.jar"/> |
| 26 | |
| 27 | <property name="icu4jdemos.jar.file" value="icu4jdemos.jar"/> |
| 28 | |
| 29 | <!-- icu4j API doc jar file --> |
| 30 | <property name="icu4jdocs.jar.file" value="icu4j-docs.jar"/> |
| 31 | |
| 32 | <!-- icu4j src jar files --> |
| 33 | <property name="icu4j-src.jar.file" value="icu4j-src.jar"/> |
| 34 | <property name="icu4j-charset-src.jar.file" value="icu4j-charset-src.jar"/> |
| 35 | <property name="icu4j-localespi-src.jar.file" value="icu4j-localespi-src.jar"/> |
| 36 | |
| 37 | <!-- icu4j source package archive files --> |
| 38 | <property name="icu4jsrc.zip.file" value="icu4j.zip"/> |
| 39 | <property name="icu4jsrc.tgz.file" value="icu4j.tgz"/> |
| 40 | |
| 41 | <!-- icu4j versioned release files --> |
| 42 | <property name="icu4j.jar.versioned.file" value="icu4j-${release.file.ver}.jar"/> |
| 43 | <property name="icu4j-charset.jar.versioned.file" value="icu4j-charset-${release.file.ver}.jar"/> |
| 44 | <property name="icu4j-localespi.jar.versioned.file" value="icu4j-localespi-${release.file.ver}.jar"/> |
| 45 | |
| 46 | <property name="icu4j-src.jar.versioned.file" value="icu4j-${release.file.ver}-src.jar"/> |
| 47 | <property name="icu4j-charset-src.jar.versioned.file" value="icu4j-charset-${release.file.ver}-src.jar"/> |
| 48 | <property name="icu4j-localespi-src.jar.versioned.file" value="icu4j-localespi-${release.file.ver}-src.jar"/> |
| 49 | |
| 50 | <property name="icu4jdocs.jar.versioned.file" value="icu4j-${release.file.ver}-docs.jar"/> |
| 51 | |
| 52 | <!-- <property name="icu4jsrc.zip.versioned.file" value="icu4j-${release.file.ver}.zip"/> --> |
| 53 | <property name="icu4jsrc.tgz.versioned.file" value="icu4j-${release.file.ver}.tgz"/> |
| 54 | |
| 55 | <!-- API doc --> |
| 56 | <property name="icu4j.api.doc.title" value="ICU4J ${api.doc.version} API Specification"/> |
| 57 | <property name="icu4j.api.doc.window.title" value="ICU4J ${api.doc.version}"/> |
| 58 | <property name="icu4j.api.doc.header" value="ICU4J ${api.doc.version}"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 59 | |
Nikita Iashchenko | ac597cb | 2018-10-17 19:47:35 -0700 | [diff] [blame] | 60 | <property name="icu4j.api.doc.jdk.link" value="https://docs.oracle.com/javase/8/docs/api/"/> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 61 | <property name="icu4j.api.doc.copyright.footer" value="<font size=-1>Copyright © 2016 Unicode, Inc. and others.</font>"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 62 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 63 | <!-- API docs for maven repo --> |
| 64 | <property name="icu4jdocs.main.jar.versioned.file" value="icu4j-${release.file.ver}-docs.jar"/> |
| 65 | <property name="icu4j.main.api.doc.title" value="ICU4J (com.ibm.icu:icu4j) ${api.doc.version} API Specification"/> |
| 66 | <property name="icu4j.main.api.doc.window.title" value="ICU4J (com.ibm.icu:icu4j) ${api.doc.version}"/> |
| 67 | <property name="icu4j.main.api.doc.header" value="ICU4J (com.ibm.icu:icu4j) ${api.doc.version}"/> |
| 68 | |
| 69 | <property name="icu4jdocs.charset.jar.versioned.file" value="icu4j-charset-${release.file.ver}-docs.jar"/> |
| 70 | <property name="icu4j.charset.api.doc.title" value="ICU4J Charset (com.ibm.icu:icu4j-charset) ${api.doc.version} API Specification"/> |
| 71 | <property name="icu4j.charset.api.doc.window.title" value="ICU4J Charset (com.ibm.icu:icu4j-charset) ${api.doc.version}"/> |
| 72 | <property name="icu4j.charset.api.doc.header" value="ICU4J Charset (com.ibm.icu:icu4j-charset) ${api.doc.version}"/> |
| 73 | |
| 74 | <property name="icu4jdocs.localespi.jar.versioned.file" value="icu4j-localespi-${release.file.ver}-docs.jar"/> |
| 75 | <property name="icu4j.locspi.api.doc.title" value="ICU4J Locale SPI Provider (com.ibm.icu:icu4j-localespi) ${api.doc.version} API Specification"/> |
| 76 | <property name="icu4j.locspi.api.doc.window.title" value="ICU4J Locale SPI Provider (com.ibm.icu:icu4j-localespi) ${api.doc.version}"/> |
| 77 | <property name="icu4j.locspi.api.doc.header" value="ICU4J Locale SPI Provider (com.ibm.icu:icu4j-localespi) ${api.doc.version}"/> |
| 78 | |
| 79 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 80 | <!-- directories --> |
| 81 | <property name="release.dir" value="release"/> |
| 82 | <property name="doc.dir" value="doc"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 83 | <property name="maven.doc.base.dir" value="${out.dir}/mavendoc"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 84 | <property name="cldr.util.out.dir" value="${out.dir}/cldr_util"/> |
| 85 | <property name="cldr.release.dir" value="release_cldr"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 86 | <property name="external-jars" value="lib"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 87 | |
| 88 | <!-- Java version check --> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 89 | <condition property="is.java7"> |
| 90 | <matches string="${java.version}" pattern="1\.7\.\d.*"/> |
| 91 | </condition> |
| 92 | |
| 93 | <condition property="is.java8"> |
| 94 | <matches string="${java.version}" pattern="1\.8\.\d.*"/> |
| 95 | </condition> |
| 96 | |
| 97 | <condition property="is.java9"> |
| 98 | <matches string="${java.version}" pattern="9((-.|\.\d).*)?"/> |
| 99 | </condition> |
| 100 | |
Fredrik Roubert | 1ac1579 | 2018-03-26 20:56:58 +0200 | [diff] [blame] | 101 | <condition property="is.java10"> |
| 102 | <matches string="${java.version}" pattern="10((-.|\.\d).*)?"/> |
| 103 | </condition> |
| 104 | |
| 105 | <condition property="is.java11"> |
| 106 | <matches string="${java.version}" pattern="11((-.|\.\d).*)?"/> |
| 107 | </condition> |
| 108 | |
| 109 | <condition property="is.java12"> |
| 110 | <matches string="${java.version}" pattern="12((-.|\.\d).*)?"/> |
| 111 | </condition> |
| 112 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 113 | <condition property="is.java8.plus"> |
| 114 | <or> |
| 115 | <isset property="is.java8"/> |
| 116 | <isset property="is.java9"/> |
Fredrik Roubert | 1ac1579 | 2018-03-26 20:56:58 +0200 | [diff] [blame] | 117 | <isset property="is.java10"/> |
| 118 | <isset property="is.java11"/> |
| 119 | <isset property="is.java12"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 120 | </or> |
| 121 | </condition> |
| 122 | |
| 123 | <condition property="is.java7.plus"> |
| 124 | <or> |
| 125 | <isset property="is.java7"/> |
| 126 | <isset property="is.java8.plus"/> |
| 127 | </or> |
| 128 | </condition> |
| 129 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 130 | <fail message="The JDK version is too old or unknown."> |
| 131 | <condition> |
| 132 | <not> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 133 | <isset property="is.java7.plus"/> |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 134 | </not> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 135 | </condition> |
| 136 | </fail> |
| 137 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 138 | |
| 139 | <!-- Build environment info --> |
| 140 | <property name="env.COMPUTERNAME" value="${env.HOSTNAME}"/> |
| 141 | <target name="info" description="Display the build environment information"> |
| 142 | <echo message="----- Build Environment Information -------------------"/> |
| 143 | <echo message="Java Home: ${java.home}"/> |
| 144 | <echo message="Java Version: ${java.version}"/> |
| 145 | <echo message="Ant Home: ${ant.home}"/> |
| 146 | <echo message="Ant Version: ${ant.version}"/> |
| 147 | <echo message="OS: ${os.name}"/> |
| 148 | <echo message="OS Version: ${os.version}"/> |
| 149 | <echo message="OS Arch: ${os.arch}"/> |
| 150 | <echo message="Host: ${env.COMPUTERNAME}"/> |
| 151 | <echo message="-------------------------------------------------------"/> |
| 152 | </target> |
| 153 | |
| 154 | <target name="clean" description="Clean up build outputs"> |
| 155 | <ant dir="${icu4j.core.dir}" target="clean" inheritAll="false"/> |
| 156 | <ant dir="${icu4j.collate.dir}" target="clean" inheritAll="false"/> |
| 157 | <ant dir="${icu4j.charset.dir}" target="clean" inheritAll="false"/> |
| 158 | <ant dir="${icu4j.currdata.dir}" target="clean" inheritAll="false"/> |
| 159 | <ant dir="${icu4j.langdata.dir}" target="clean" inheritAll="false"/> |
| 160 | <ant dir="${icu4j.localespi.dir}" target="clean" inheritAll="false"/> |
| 161 | <ant dir="${icu4j.regiondata.dir}" target="clean" inheritAll="false"/> |
| 162 | <ant dir="${icu4j.translit.dir}" target="clean" inheritAll="false"/> |
| 163 | <ant dir="${icu4j.test-framework.dir}" target="clean" inheritAll="false"/> |
| 164 | <ant dir="${icu4j.core-tests.dir}" target="clean" inheritAll="false"/> |
| 165 | <ant dir="${icu4j.collate-tests.dir}" target="clean" inheritAll="false"/> |
| 166 | <ant dir="${icu4j.charset-tests.dir}" target="clean" inheritAll="false"/> |
| 167 | <ant dir="${icu4j.localespi-tests.dir}" target="clean" inheritAll="false"/> |
| 168 | <ant dir="${icu4j.packaging-tests.dir}" target="clean" inheritAll="false"/> |
| 169 | <ant dir="${icu4j.translit-tests.dir}" target="clean" inheritAll="false"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 170 | <ant dir="${icu4j.build-tools.dir}" target="clean" inheritAll="false"/> |
| 171 | <ant dir="${icu4j.tools.dir}" target="clean" inheritAll="false"/> |
| 172 | <ant dir="${icu4j.demos.dir}" target="clean" inheritAll="false"/> |
| 173 | <ant dir="${icu4j.samples.dir}" target="clean" inheritAll="false"/> |
| 174 | <ant dir="${icu4j.perf-tests.dir}" target="clean" inheritAll="false"/> |
| 175 | |
| 176 | <!-- delete all .jar files root directory --> |
| 177 | <delete> |
| 178 | <fileset dir="." includes="icu4j*.jar"/> |
| 179 | </delete> |
| 180 | |
| 181 | <delete dir="${release.dir}"/> |
| 182 | <delete dir="${doc.dir}"/> |
| 183 | <delete dir="${out.dir}"/> |
| 184 | <delete dir="${module.dir}"/> |
| 185 | <delete dir="${cldr.release.dir}"/> |
| 186 | |
| 187 | <available file="eclipse-build" type="dir" property="eclipse-build.dir.present"/> |
| 188 | <antcall target="_clean.eclipse-build"/> |
| 189 | </target> |
| 190 | |
| 191 | <target name="_clean.eclipse-build" if="eclipse-build.dir.present"> |
| 192 | <ant dir="eclipse-build" target="clean" inheritAll="false"/> |
| 193 | </target> |
| 194 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 195 | <target name="ivy-clean"> |
| 196 | <ivy:cleancache/> |
| 197 | </target> |
| 198 | |
| 199 | <!-- Ivy Targets --> |
| 200 | <property name="ivy.install.version" value="2.1.0-rc2" /> |
| 201 | <condition property="ivy.home" value="${env.IVY_HOME}"> |
| 202 | <isset property="env.IVY_HOME" /> |
| 203 | </condition> |
| 204 | <property name="ivy.home" value="${user.home}/.ant" /> |
| 205 | <property name="ivy.jar.dir" value="${ivy.home}/lib" /> |
| 206 | <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" /> |
| 207 | |
| 208 | <target name="download-ivy" unless="offline"> |
| 209 | <mkdir dir="${ivy.jar.dir}"/> |
| 210 | <!-- download Ivy from web site so that it can be used even without any special installation --> |
| 211 | <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" |
| 212 | dest="${ivy.jar.file}" usetimestamp="true"/> |
| 213 | </target> |
| 214 | |
| 215 | <target name="init-ivy" depends="download-ivy"> |
| 216 | <!-- try to load ivy here from ivy home, in case the user has not already dropped |
| 217 | it into ant's lib dir (note that the latter copy will always take precedence). |
| 218 | We will not fail as long as local lib dir exists (it may be empty) and |
| 219 | ivy is in at least one of ant's lib dir or the local lib dir. --> |
| 220 | <path id="ivy.lib.path"> |
| 221 | <fileset dir="${ivy.jar.dir}" includes="*.jar"/> |
| 222 | </path> |
| 223 | <taskdef resource="org/apache/ivy/ant/antlib.xml" |
| 224 | uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/> |
| 225 | </target> |
| 226 | |
| 227 | <target name="test-init-junit-dependency" depends="init-ivy"> |
| 228 | <ivy:retrieve/> |
| 229 | </target> |
| 230 | |
| 231 | <target name="init" depends="test-init-junit-dependency" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 232 | description="Initialize the environment for build and test. May require internet access."/> |
| 233 | |
| 234 | <target name="_classifytests"> |
| 235 | <condition property="testaction.run"> |
| 236 | <isset property="testclass"/> |
| 237 | </condition> |
| 238 | <condition property="testaction.class"> |
| 239 | <and> |
| 240 | <isset property="testclass"/> |
| 241 | <not><isset property="testnames"/></not> |
| 242 | </and> |
| 243 | </condition> |
| 244 | <condition property="testaction.tests"> |
| 245 | <and> |
| 246 | <isset property="testclass"/> |
| 247 | <isset property="testnames"/> |
| 248 | </and> |
| 249 | </condition> |
| 250 | <condition property="testaction.error"> |
| 251 | <and> |
| 252 | <not><isset property="testclass"/></not> |
| 253 | <isset property="testnames"/> |
| 254 | </and> |
| 255 | </condition> |
| 256 | <condition property="testaction.all"> |
| 257 | <and> |
| 258 | <not><isset property="testclass"/></not> |
| 259 | <not><isset property="testnames"/></not> |
| 260 | </and> |
| 261 | </condition> |
| 262 | </target> |
| 263 | |
| 264 | <target name="checkTest" depends="_classifytests, tests, runallTests, noTests" if="testaction.run" description="Run only the specified tests of the specified test class or, if no arguments are given, the standard ICU4J test suite."> |
| 265 | <sequential> |
| 266 | <delete dir="${junit.out.dir}/checkTest"/> |
| 267 | <mkdir dir="${junit.out.dir}/checkTest"/> |
| 268 | |
| 269 | <junit printsummary="yes"> |
| 270 | <classpath> |
| 271 | <path refid="junit.jars"/> |
| 272 | <path refid="junit.icu.jars"/> |
| 273 | </classpath> |
| 274 | <test name="${testclass}" todir="${junit.out.dir}/checkTest" outfile="checkTest" methods="${testnames}" if="testaction.tests"> |
| 275 | <formatter type="xml"/> |
| 276 | </test> |
| 277 | <test name="${testclass}" todir="${junit.out.dir}/checkTest" outfile="checkTest" if="testaction.class"> |
| 278 | <formatter type="xml"/> |
| 279 | </test> |
| 280 | </junit> |
| 281 | |
| 282 | <junitreport todir="${junit.out.dir}/checkTest"> |
| 283 | <fileset dir="${junit.out.dir}/checkTest"> |
| 284 | <include name="checkTest.xml"/> |
| 285 | </fileset> |
| 286 | <report format="frames" todir="${junit.out.dir}/checkTest/html"/> |
| 287 | </junitreport> |
| 288 | |
| 289 | <fail message="test failed: @{testdir}" if="@{failure-status}" /> |
| 290 | </sequential> |
| 291 | </target> |
| 292 | |
| 293 | <target name="runallTests" if="testaction.all"> |
| 294 | <antcall target="allTests"/> |
| 295 | </target> |
| 296 | |
| 297 | <target name="allTests" depends="check"/> |
| 298 | |
| 299 | <target name="noTests" if="testaction.error"> |
| 300 | <echo>Execute JUnit testing using -Dtestclass='class-name' -Dtestnames='test-name1>, test-name2, ...'</echo> |
| 301 | </target> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 302 | |
| 303 | <!-- Junit Targets --> |
| 304 | <macrodef name="icu-junit"> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 305 | <attribute name="test-name"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 306 | <attribute name="jvm-options" default=""/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 307 | <attribute name="classpath" default="junit.icu.jars"/> |
| 308 | <attribute name="failure-status" default="ignore"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 309 | <element name="junit-fileset"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 310 | <element name="junit-parameters" optional="true"/> |
| 311 | <sequential> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 312 | <echo message="@{jvm-options}"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 313 | <!--set the property - if it was set before it won't override--> |
| 314 | <property name="user-jvm-options" value=""/> |
| 315 | <property name="internal-jvm-options" value=""/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 316 | <delete dir="${junit.out.dir}/@{test-name}"/> |
| 317 | <mkdir dir="${junit.out.dir}/@{test-name}"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 318 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 319 | <junit fork="yes" forkmode="once" printsummary="yes" haltonfailure="no" |
| 320 | failureproperty="@{failure-status}" tempdir="${junit.out.dir}"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 321 | <jvmarg value="-Xss4m"/> |
| 322 | <jvmarg value="-ea"/> |
| 323 | <jvmarg value="-Djava.awt.headless=true"/> |
| 324 | <jvmarg line="${user-jvm-options}"/> |
| 325 | <jvmarg line="@{jvm-options}"/> |
| 326 | <jvmarg line="${internal-jvm-options}"/> |
| 327 | <junit-parameters/> |
| 328 | <classpath> |
| 329 | <path refid="junit.jars"/> |
| 330 | <path refid="@{classpath}"/> |
| 331 | </classpath> |
| 332 | <formatter type="plain"/> |
| 333 | <formatter type="xml"/> |
| 334 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 335 | <batchtest todir="${junit.out.dir}/@{test-name}"> |
| 336 | <junit-fileset/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 337 | </batchtest> |
| 338 | </junit> |
| 339 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 340 | <junitreport tofile="@{test-name}-TestSuite.xml" todir="${junit.out.dir}/@{test-name}"> |
| 341 | <fileset dir="${junit.out.dir}/@{test-name}"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 342 | <include name="*.xml"/> |
| 343 | </fileset> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 344 | <report format="frames" todir="${junit.out.dir}/@{test-name}/html"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 345 | </junitreport> |
| 346 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 347 | <fail message="test failed: @{test-name}" if="@{failure-status}" /> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 348 | |
| 349 | </sequential> |
| 350 | </macrodef> |
| 351 | |
| 352 | <property name="junit.out.dir" value="${out.dir}/junit-results"/> |
| 353 | <property name="junit.core.jar" value="${external-jars}/junit-4.12.jar"/> |
| 354 | <property name="junit.hamcrest.jar" value="${external-jars}/hamcrest-core-1.3.jar"/> |
| 355 | <property name="junit.junitparams.jar" value="${external-jars}/JUnitParams-1.0.5.jar"/> |
| 356 | <path id="junit.jars"> |
| 357 | <pathelement path="${junit.core.jar}"/> |
| 358 | <pathelement path="${junit.hamcrest.jar}"/> |
| 359 | <pathelement path="${junit.junitparams.jar}"/> |
| 360 | </path> |
| 361 | |
| 362 | <path id="junit.icu.jars"> |
| 363 | <pathelement location="${icu4j.core.jar}"/> |
| 364 | <pathelement location="${icu4j.collate.jar}"/> |
| 365 | <pathelement location="${icu4j.charset.jar}"/> |
| 366 | <pathelement location="${icu4j.currdata.jar}"/> |
| 367 | <pathelement location="${icu4j.langdata.jar}"/> |
| 368 | <pathelement location="${icu4j.regiondata.jar}"/> |
| 369 | <pathelement location="${icu4j.translit.jar}"/> |
| 370 | <pathelement location="${icu4j.test-framework.jar}"/> |
| 371 | <pathelement location="${icu4j.core-tests.jar}"/> |
| 372 | <pathelement location="${icu4j.collate-tests.jar}"/> |
| 373 | <pathelement location="${icu4j.charset-tests.jar}"/> |
| 374 | <pathelement location="${icu4j.translit-tests.jar}"/> |
| 375 | <pathelement location="${icu4j.localespi-tests.jar}"/> |
| 376 | <pathelement location="${icu4j.packaging-tests.jar}"/> |
| 377 | <pathelement location="${icu4j.regiondata.jar}"/> |
| 378 | </path> |
| 379 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 380 | <path id="junit.icu.release.jars"> |
| 381 | <pathelement location="${icu4j.jar.file}"/> |
| 382 | <pathelement location="${icu4j.charset.jar}"/> |
| 383 | <pathelement location="${icu4jtests.jar.file}"/> |
| 384 | </path> |
| 385 | |
| 386 | <path id="junit.icu.localespi-tests.jars"> |
| 387 | <pathelement location="${icu4j.test-framework.jar}"/> |
| 388 | <pathelement location="${icu4j.localespi-tests.jar}"/> |
| 389 | </path> |
| 390 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 391 | <!--Class names that will be included/excluded as tests--> |
| 392 | <patternset id="test-classes-patternset"> |
| 393 | <include name="**/*Test*"/> |
| 394 | <exclude name="**/*Fmwk*"/> |
| 395 | <exclude name="**/*TestUtility*"/> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 396 | <exclude name="**/*TestHelper*"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 397 | <exclude name="**/*TestCase*"/> |
| 398 | <exclude name="**/*TestData*"/> |
| 399 | <exclude name="**/*TestSample*"/> |
| 400 | <exclude name="**/*$*.class"/> |
| 401 | <exclude name="**/data/**"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 402 | <exclude name="com/ibm/icu/dev/test/*"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 403 | </patternset> |
| 404 | |
| 405 | <!--Class names that will be included/excluded as tests for time zone check--> |
| 406 | <patternset id="timeZoneCheck-patternset"> |
| 407 | <include name="**/TimeZoneFormatTest*"/> |
| 408 | <exclude name="**/*$*.class"/> |
| 409 | </patternset> |
| 410 | |
| 411 | <!--Class names that will be included/excluded as tests for packaging check--> |
| 412 | <patternset id="packagingCheck-patternset"> |
| 413 | <include name="**/TestLocaleNamePackaging*"/> |
| 414 | <exclude name="**/*$*.class"/> |
| 415 | </patternset> |
| 416 | |
| 417 | <!--Class names that will be included/excluded as tests for locale SPI check--> |
| 418 | <patternset id="localespiCheck-patternset"> |
| 419 | <include name="**/*Test*"/> |
| 420 | <exclude name="com/ibm/icu/dev/test/localespi/TestUtil.*"/> |
| 421 | <exclude name="**/*$*.class"/> |
| 422 | </patternset> |
| 423 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 424 | <!-- meta build targets --> |
| 425 | <target name="all" depends="info, main, tests, build-tools, tools, demos, samples, perf-tests, jar, docs" description="Build all primary targets"/> |
| 426 | <target name="main" depends="info, core, collate, charset, currdata, langdata, regiondata, translit, localespi" description="Build ICU4J runtime library classes"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 427 | <target name="tests" depends="info, core-tests, charset-tests, collate-tests, packaging-tests, translit-tests, localespi-tests" description="Build ICU4J test classes"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 428 | |
| 429 | <target name="secure" depends="icu4jJar" description="(Deprecated)Build ICU4J API and test classes for running the ICU4J test suite with Java security manager enabled"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 430 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 431 | <!-- Check to see if JVM_OPTIONS enviroment variable is set. This can be use to set the heap size. --> |
| 432 | <property name="env.JVM_OPTIONS" value=""/> |
| 433 | <property name="jvm_options" value="${env.JVM_OPTIONS}"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 434 | |
| 435 | <target name="_check"> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 436 | <parallel> |
| 437 | <antcall target="_charsetCheck"/> |
| 438 | <antcall target="_collateCheck"/> |
| 439 | <antcall target="_coreCheck"/> |
| 440 | <antcall target="_translitCheck"/> |
| 441 | </parallel> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 442 | </target> |
| 443 | |
| 444 | <target name="exhaustiveCheck" description="Run the standard ICU4J test suite in exhaustive mode"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 445 | <antcall target="check"> |
| 446 | <param name="internal-jvm-options" value="-DICU.exhaustive=10"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 447 | </antcall> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 448 | <fail message="test failed" if="icu-junit-failure" /> |
| 449 | </target> |
| 450 | |
| 451 | <target name="check" depends="main, tests" description="Run the standard ICU4J test suite"> |
| 452 | <antcall target="_check"/> |
| 453 | <fail message="test failed" if="icu-junit-failure" /> |
| 454 | </target> |
| 455 | |
| 456 | <target name="runTest" description="Run the standard ICU4J test suite without calling any other build targets"> |
| 457 | <antcall target="_check"/> |
| 458 | <fail message="test failed" if="icu-junit-failure" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 459 | </target> |
| 460 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 461 | <target name="releaseJarCheck" depends="jar, icu4jtestsJar" description="Run the ICU4J test suite with ICU4J release jar files"> |
| 462 | <icu-junit test-name="releaseJarCheck" |
| 463 | classpath="junit.icu.release.jars" |
| 464 | failure-status="icu-junit-failure"> |
| 465 | <junit-fileset> |
| 466 | <zipfileset src="${icu4jtests.jar.file}"> |
| 467 | <patternset refid="test-classes-patternset"/> |
| 468 | </zipfileset> |
| 469 | </junit-fileset> |
| 470 | </icu-junit> |
| 471 | <fail message="test failed - icu4j/icu4j-charset" if="icu-junit-failure" /> |
| 472 | |
| 473 | <property name="test.java.ext.dir" value="${out.dir}/localespi-ext"/> |
| 474 | <delete dir="${test.java.ext.dir}"/> |
| 475 | <mkdir dir="${test.java.ext.dir}"/> |
| 476 | <copy file="${icu4j-localespi.jar.file}" todir="${test.java.ext.dir}"/> |
| 477 | <copy file="${icu4j.jar.file}" todir="${test.java.ext.dir}"/> |
| 478 | |
| 479 | <icu-junit test-name="releaseJarCheck-localespi" |
| 480 | classpath="junit.icu.localespi-tests.jars" |
| 481 | jvm-options="-Djava.ext.dirs=${test.java.ext.dir}${path.separator}${java.ext.dirs}" |
| 482 | failure-status="icu-junit-failure"> |
| 483 | <junit-fileset> |
| 484 | <fileset dir="${icu4j.localespi-tests.dir}/${bin.dir}"> |
| 485 | <patternset refid="localespiCheck-patternset"/> |
| 486 | </fileset> |
| 487 | </junit-fileset> |
| 488 | </icu-junit> |
| 489 | <fail message="test failed - icu4j-localespi" if="icu-junit-failure" /> |
| 490 | </target> |
| 491 | |
| 492 | <target name="timeZoneCheck" depends="main, tests" description="Run the complete test for TimeZoneRoundTripAll"> |
| 493 | <icu-junit test-name="timeZoneCheck" |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 494 | jvm-options="-DTimeZoneRoundTripAll=true" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 495 | failure-status="icu-junit-failure"> |
| 496 | <junit-fileset> |
| 497 | <fileset dir="${icu4j.core-tests.dir}/${bin.dir}"> |
| 498 | <patternset refid="timeZoneCheck-patternset"/> |
| 499 | </fileset> |
| 500 | </junit-fileset> |
| 501 | </icu-junit> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 502 | <fail message="test failed" if="icu-junit-failure" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 503 | </target> |
| 504 | |
| 505 | <target name="jdktzCheck" description="Run the standard ICU4J test suite with JDK TimeZone"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 506 | <antcall target="check"> |
| 507 | <param name="internal-jvm-options" value="-Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=JDK"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 508 | </antcall> |
| 509 | </target> |
| 510 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 511 | <path id="junit.icu.jars.PackagingCheckNoLangData"> |
| 512 | <pathelement location="${icu4j.core.jar}"/> |
| 513 | <pathelement location="${icu4j.charset.jar}"/> |
| 514 | <pathelement location="${icu4j.test-framework.jar}"/> |
| 515 | <pathelement location="${icu4j.packaging-tests.jar}"/> |
| 516 | <pathelement location="${icu4j.regiondata.jar}"/> |
| 517 | </path> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 518 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 519 | <path id="junit.icu.jars.PackagingCheckNoRegionData"> |
| 520 | <pathelement location="${icu4j.core.jar}"/> |
| 521 | <pathelement location="${icu4j.charset.jar}"/> |
| 522 | <pathelement location="${icu4j.test-framework.jar}"/> |
| 523 | <pathelement location="${icu4j.packaging-tests.jar}"/> |
| 524 | <pathelement location="${icu4j.langdata.jar}"/> |
| 525 | </path> |
| 526 | |
| 527 | <path id="junit.icu.jars.PackagingCheckNoLangNorRegionData"> |
| 528 | <pathelement location="${icu4j.core.jar}"/> |
| 529 | <pathelement location="${icu4j.charset.jar}"/> |
| 530 | <pathelement location="${icu4j.test-framework.jar}"/> |
| 531 | <pathelement location="${icu4j.packaging-tests.jar}"/> |
| 532 | </path> |
| 533 | |
| 534 | <target name="_packagingCheckNoLangData"> |
| 535 | <!-- region data but no language data --> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 536 | <icu-junit test-name="packaging-NoLangData" |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 537 | classpath="junit.icu.jars.PackagingCheckNoLangData" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 538 | failure-status="icu-junit-failure"> |
| 539 | <junit-fileset> |
| 540 | <fileset dir="${icu4j.packaging-tests.dir}/${bin.dir}"> |
| 541 | <patternset refid="packagingCheck-patternset"/> |
| 542 | </fileset> |
| 543 | </junit-fileset> |
| 544 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 545 | </target> |
| 546 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 547 | <target name="_packagingCheckNoRegionData"> |
| 548 | <!-- language data but no region data --> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 549 | <icu-junit test-name="packaging-NoRegionData" |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 550 | classpath="junit.icu.jars.PackagingCheckNoRegionData" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 551 | failure-status="icu-junit-failure"> |
| 552 | <junit-fileset> |
| 553 | <fileset dir="${icu4j.packaging-tests.dir}/${bin.dir}"> |
| 554 | <patternset refid="packagingCheck-patternset"/> |
| 555 | </fileset> |
| 556 | </junit-fileset> |
| 557 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 558 | </target> |
| 559 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 560 | <target name="_packagingCheckNoLangNorRegionData"> |
| 561 | <!-- neither region nor language data --> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 562 | <icu-junit test-name="packaging-NoLangNorRegionData" |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 563 | classpath="junit.icu.jars.PackagingCheckNoLangNorRegionData" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 564 | failure-status="icu-junit-failure"> |
| 565 | <junit-fileset> |
| 566 | <fileset dir="${icu4j.packaging-tests.dir}/${bin.dir}"> |
| 567 | <patternset refid="packagingCheck-patternset"/> |
| 568 | </fileset> |
| 569 | </junit-fileset> |
| 570 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 571 | </target> |
| 572 | |
| 573 | <target name="packagingCheck" depends="info, core, packaging-tests" description="Run packaging tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 574 | <antcall target="_packagingCheckNoLangData"/> |
| 575 | <antcall target="_packagingCheckNoRegionData"/> |
| 576 | <antcall target="_packagingCheckNoLangNorRegionData"/> |
| 577 | <fail message="test failed" if="icu-junit-failure" /> |
| 578 | </target> |
| 579 | |
| 580 | <target name="_coreCheck"> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 581 | <icu-junit test-name="core" failure-status="icu-junit-failure"> |
| 582 | <junit-fileset> |
| 583 | <fileset dir="${icu4j.core-tests.dir}/${bin.dir}"> |
| 584 | <patternset refid="test-classes-patternset"/> |
| 585 | </fileset> |
| 586 | </junit-fileset> |
| 587 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 588 | </target> |
| 589 | |
| 590 | <target name="coreCheck" depends="info, core, currdata, langdata, regiondata, core-tests" description="Run only the core tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 591 | <antcall target="_coreCheck"/> |
| 592 | <fail message="test failed" if="icu-junit-failure" /> |
| 593 | </target> |
| 594 | |
| 595 | <target name="_charsetCheck"> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 596 | <icu-junit test-name="charset" failure-status="icu-junit-failure"> |
| 597 | <junit-fileset> |
| 598 | <fileset dir="${icu4j.charset-tests.dir}/${bin.dir}"> |
| 599 | <patternset refid="test-classes-patternset"/> |
| 600 | </fileset> |
| 601 | </junit-fileset> |
| 602 | </icu-junit> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 603 | </target> |
| 604 | |
| 605 | <target name="charsetCheck" depends="info, core, charset, currdata, langdata, regiondata, core-tests, charset-tests" description="Run only the charset tests"> |
| 606 | <antcall target="_charsetCheck"/> |
| 607 | <fail message="test failed" if="icu-junit-failure" /> |
| 608 | </target> |
| 609 | |
| 610 | <target name="_collateCheck"> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 611 | <icu-junit test-name="collate" failure-status="icu-junit-failure"> |
| 612 | <junit-fileset> |
| 613 | <fileset dir="${icu4j.collate-tests.dir}/${bin.dir}"> |
| 614 | <patternset refid="test-classes-patternset"/> |
| 615 | </fileset> |
| 616 | </junit-fileset> |
| 617 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 618 | </target> |
| 619 | |
| 620 | <target name="collateCheck" depends="info, core, collate, currdata, langdata, regiondata, core-tests, collate-tests" description="Run only the collation tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 621 | <antcall target="_collateCheck"/> |
| 622 | <fail message="test failed" if="icu-junit-failure" /> |
| 623 | </target> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 624 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 625 | <target name="_translitCheck"> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 626 | <icu-junit test-name="translit" failure-status="icu-junit-failure"> |
| 627 | <junit-fileset> |
| 628 | <fileset dir="${icu4j.translit-tests.dir}/${bin.dir}"> |
| 629 | <patternset refid="test-classes-patternset"/> |
| 630 | </fileset> |
| 631 | </junit-fileset> |
| 632 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 633 | </target> |
| 634 | |
| 635 | <target name="translitCheck" depends="info, core, translit, translit-tests" description="Run the ICU4J Translit test suite"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 636 | <antcall target="_translitCheck"/> |
| 637 | <fail message="test failed" if="icu-junit-failure" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 638 | </target> |
| 639 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 640 | <target name="_localespiCheck"> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 641 | <icu-junit test-name="localespi" |
| 642 | classpath="junit.icu.localespi-tests.jars" |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 643 | jvm-options="-Djava.ext.dirs=${icu4j.core.dir}/${jar.dir}${path.separator}${icu4j.localespi.dir}/${jar.dir}${path.separator}${icu4j.collate.dir}/${jar.dir}${path.separator}${icu4j.currdata.dir}/${jar.dir}${path.separator}${icu4j.langdata.dir}/${jar.dir}${path.separator}${icu4j.regiondata.dir}/${jar.dir}${path.separator}${java.ext.dirs}" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 644 | failure-status="icu-junit-failure"> |
| 645 | <junit-fileset> |
| 646 | <fileset dir="${icu4j.localespi-tests.dir}/${bin.dir}"> |
| 647 | <patternset refid="localespiCheck-patternset"/> |
| 648 | </fileset> |
| 649 | </junit-fileset> |
| 650 | </icu-junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 651 | </target> |
| 652 | |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 653 | <target name="localespiCheck" depends="info, localespi, localespi-tests" description="Run the ICU4J Locale SPI test suite"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 654 | <antcall target="_localespiCheck"/> |
| 655 | <fail message="test failed" if="icu-junit-failure" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 656 | </target> |
| 657 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 658 | <target name="secureCheck" depends="jar, icu4jtestsJar" description="Run the ICU4J test suite with Java security manager enabled"> |
| 659 | <icu-junit test-name="secureCheck" |
| 660 | classpath="junit.icu.release.jars" |
| 661 | jvm-options="-Djava.security.manager -Djava.security.policy=${user.dir}/${shared.dir}/data/security.policy" |
| 662 | failure-status="icu-junit-failure"> |
| 663 | <junit-fileset> |
| 664 | <zipfileset src="${icu4jtests.jar.file}"> |
| 665 | <patternset refid="test-classes-patternset"/> |
| 666 | </zipfileset> |
| 667 | </junit-fileset> |
| 668 | </icu-junit> |
| 669 | <fail message="test failed" if="icu-junit-failure" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 670 | </target> |
| 671 | |
| 672 | <!-- jar targets --> |
| 673 | <target name="jar" depends="icu4jJar, charset, localespi" description="Build ICU4J runtime library jar files"> |
| 674 | <copy file="${icu4j.charset.jar}" tofile="${icu4j-charset.jar.file}"/> |
| 675 | <copy file="${icu4j.localespi.jar}" tofile="${icu4j-localespi.jar.file}" failonerror="false"/> |
| 676 | </target> |
| 677 | |
| 678 | <target name="icu4jJar" depends="info, core, collate, currdata, langdata, regiondata, translit" description="Build ICU4J all-in-one core jar"> |
| 679 | <mkdir dir="${out.dir}"/> |
| 680 | |
| 681 | <!-- manifest --> |
| 682 | <copy file="manifest.stub" todir="${out.dir}"> |
| 683 | <filterset> |
| 684 | <filter token="SPECVERSION" value="${jar.spec.version}"/> |
| 685 | <filter token="IMPLVERSION" value="${jar.impl.version}"/> |
| 686 | <filter token="COPYRIGHT" value="${jar.copyright.info}"/> |
| 687 | <filter token="EXECENV" value="${jar.exec.env}"/> |
| 688 | </filterset> |
| 689 | </copy> |
| 690 | |
| 691 | <!-- jar --> |
| 692 | <jar jarfile="${icu4j.jar.file}" |
| 693 | compress="true" |
| 694 | manifest="${out.dir}/manifest.stub"> |
| 695 | <fileset dir="${icu4j.core.dir}/${bin.dir}" includes="**/*"/> |
| 696 | <fileset dir="${icu4j.collate.dir}/${bin.dir}" includes="**/*"/> |
| 697 | <fileset dir="${icu4j.currdata.dir}/${bin.dir}" includes="**/*"/> |
| 698 | <fileset dir="${icu4j.langdata.dir}/${bin.dir}" includes="**/*"/> |
| 699 | <fileset dir="${icu4j.regiondata.dir}/${bin.dir}" includes="**/*"/> |
| 700 | <fileset dir="${icu4j.translit.dir}/${bin.dir}" includes="**/*"/> |
| 701 | <fileset dir="${shared.dir}/licenses"> |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 702 | <include name="LICENSE"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 703 | </fileset> |
| 704 | </jar> |
| 705 | </target> |
| 706 | |
| 707 | <target name="icu4jSrcJar" description="Build icu4j-src.jar"> |
| 708 | <jar jarfile="${icu4j-src.jar.file}" |
| 709 | compress="true"> |
| 710 | <fileset dir="${icu4j.core.dir}/${src.dir}" includes="**/*.java"/> |
| 711 | <fileset dir="${icu4j.collate.dir}/${src.dir}" includes="**/*.java"/> |
| 712 | <fileset dir="${icu4j.currdata.dir}/${src.dir}" includes="**/*.java"/> |
| 713 | <fileset dir="${icu4j.langdata.dir}/${src.dir}" includes="**/*.java"/> |
| 714 | <fileset dir="${icu4j.regiondata.dir}/${src.dir}" includes="**/*.java"/> |
| 715 | <fileset dir="${icu4j.translit.dir}/${src.dir}" includes="**/*.java"/> |
| 716 | <fileset dir="${shared.dir}/licenses"> |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 717 | <include name="LICENSE"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 718 | </fileset> |
| 719 | </jar> |
| 720 | </target> |
| 721 | |
| 722 | <target name="icu4jtestsJar" depends="info, tests" description="Build ICU4J all-in-one test jar"> |
| 723 | <jar jarfile="${icu4jtests.jar.file}" |
| 724 | compress="true"> |
| 725 | <fileset dir="${icu4j.test-framework.dir}/${bin.dir}" includes="**/*"/> |
| 726 | <fileset dir="${icu4j.core-tests.dir}/${bin.dir}" includes="**/*"/> |
| 727 | <fileset dir="${icu4j.collate-tests.dir}/${bin.dir}" includes="**/*"/> |
| 728 | <fileset dir="${icu4j.translit-tests.dir}/${bin.dir}" includes="**/*"/> |
| 729 | <fileset dir="${icu4j.charset-tests.dir}/${bin.dir}" includes="**/*"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 730 | </jar> |
| 731 | </target> |
| 732 | |
| 733 | <target name="jarDemos" depends="icu4jJar, demos" description="Build ICU4J demo jar file"> |
| 734 | <copy file="${icu4j.demos.jar}" tofile="${icu4jdemos.jar.file}"/> |
| 735 | </target> |
| 736 | |
| 737 | |
| 738 | <!-- release targets --> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 739 | <target name="_check_config_for_release" depends="_checkJCite"> |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 740 | <condition property="release.build.config.ok"> |
| 741 | <and> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 742 | <isset property="is.java8"/> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 743 | <isset property="java7.bootclasspath"/> |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 744 | <isset property="jcite.libs"/> |
| 745 | </and> |
| 746 | </condition> |
| 747 | </target> |
| 748 | |
| 749 | <target name="_verify_config_for_release" depends="_check_config_for_release" unless="release.build.config.ok"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 750 | <condition property="disp.is.java8" value="${java.version}" else="${java.version} - Must be 1.8!"> |
| 751 | <isset property="is.java8"/> |
Fredrik Roubert | bd1cbb6 | 2015-09-28 21:14:09 +0200 | [diff] [blame] | 752 | </condition> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 753 | <condition property="disp.java7.bootclasspath" value="${java7.bootclasspath}" else="Not Defined!"> |
| 754 | <isset property="java7.bootclasspath"/> |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 755 | </condition> |
| 756 | <condition property="disp.jcite.libs" value="${jcite.libs}" else="Not Defined!"> |
| 757 | <isset property="jcite.libs"/> |
| 758 | </condition> |
| 759 | |
| 760 | <echo message="################################################################"/> |
| 761 | <echo message="[WARNING] Insufficient Build Configuration for ICU4J Release"/> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 762 | <echo message="JDK 8 Tools: ${disp.is.java8}"/> |
| 763 | <echo message="JRE 7 System Library Path: ${disp.java7.bootclasspath}"/> |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 764 | <echo message="JCite Library Path: ${disp.jcite.libs}"/> |
| 765 | <echo message="################################################################"/> |
| 766 | </target> |
| 767 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 768 | <target name="_final_release_check" depends="_verify_config_for_release"> |
| 769 | <fail message="Insufficient Build Configuration for ICU4J Release" unless="release.build.config.ok"/> |
| 770 | |
| 771 | <fail message="Maven Ant Tasks are required to publish libraries. Set maven-ant-tasks.jar property. Maven Ant Tasks URL: http://maven.apache.org/ant-tasks/" unless="maven-ant-tasks.jar"/> |
| 772 | <condition property="no_maven-ant-tasks"> |
| 773 | <available file="${maven-ant-tasks.jar}"/> |
| 774 | </condition> |
| 775 | <fail message="Maven Ant Tasks not found at ${maven-ant-tasks.jar}" unless="no_maven-ant-tasks"/> |
| 776 | </target> |
| 777 | |
| 778 | <!-- |
| 779 | The ant target releaseFinal is used for ICU official release. |
| 780 | This target builds ICU4J library jars, source jars and API document jars. |
| 781 | Also, this target publishes ICU4J artifacts to OSSRH staging repository. |
| 782 | |
| 783 | Prerequisites |
| 784 | |
| 785 | 1) Apache Maven Ant tasks - http://maven.apache.org/ant-tasks |
| 786 | |
| 787 | Note: Apache Maven Ant tasks was already deprecated. You can still |
| 788 | download the latest version from Maven Central |
| 789 | http://central.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar |
| 790 | |
| 791 | TODO: Because mavne-ant-tasks was already deprecated and no longer maintained, |
| 792 | we should look for alternative solution. |
| 793 | |
| 794 | 2) GnuPG |
| 795 | |
| 796 | 3) Put build-local.properties to specify followings |
| 797 | |
| 798 | maven-ant-tasks.jar = [location of maven ant tasks jar file] |
| 799 | gpg.user = ICU Project |
| 800 | |
| 801 | 4) Maven configuration file ~/.m2/settings.xml |
| 802 | <settings> |
| 803 | <servers> |
| 804 | <server> |
| 805 | <id>icu4j-releases</id> |
| 806 | <username>[oss.sonatype.org Nexus account ID]</username> |
| 807 | <password>[oss.sonatype.org Nexus account password]</password> |
| 808 | </server> |
| 809 | <server> |
| 810 | <id>icu4j-snapshots</id> |
| 811 | <username>[oss.sonatype.org Nexus account ID]</username> |
| 812 | <password>[oss.sonatype.org Nexus account password]</password> |
| 813 | </server> |
| 814 | </servers> |
| 815 | </settings> |
| 816 | --> |
| 817 | <target name="releaseFinal" depends="info, _final_release_check, releaseVer, docsMaven" |
| 818 | description="Build all ICU4J release files for distribution and upload them to the OSSRH staging repository"> |
| 819 | |
| 820 | <property name="maven.pom.dir" value="maven"/> |
| 821 | <property name="maven.icu4j.release.dir" value="${release.dir}/maven/icu4j"/> |
| 822 | <property name="maven.charset.release.dir" value="${release.dir}/maven/icu4j-charset"/> |
| 823 | <property name="maven.localespi.release.dir" value="${release.dir}/maven/icu4j-localespi"/> |
| 824 | |
| 825 | <property name="maven.icu4j.jar.file" value="icu4j-${maven.pom.ver}.jar"/> |
| 826 | <property name="maven.icu4j.src.jar.file" value="icu4j-${maven.pom.ver}-sources.jar"/> |
| 827 | <property name="maven.icu4j.doc.jar.file" value="icu4j-${maven.pom.ver}-javadoc.jar"/> |
| 828 | |
| 829 | <property name="maven.charset.jar.file" value="icu4j-charset-${maven.pom.ver}.jar"/> |
| 830 | <property name="maven.charset.src.jar.file" value="icu4j-charset-${maven.pom.ver}-sources.jar"/> |
| 831 | <property name="maven.charset.doc.jar.file" value="icu4j-charset-${maven.pom.ver}-javadoc.jar"/> |
| 832 | |
| 833 | <property name="maven.localespi.jar.file" value="icu4j-localespi-${maven.pom.ver}.jar"/> |
| 834 | <property name="maven.localespi.src.jar.file" value="icu4j-localespi-${maven.pom.ver}-sources.jar"/> |
| 835 | <property name="maven.localespi.doc.jar.file" value="icu4j-localespi-${maven.pom.ver}-javadoc.jar"/> |
| 836 | |
| 837 | |
| 838 | <delete dir="${release.dir}/maven"/> |
| 839 | <mkdir dir="${maven.icu4j.release.dir}"/> |
| 840 | <mkdir dir="${maven.charset.release.dir}"/> |
| 841 | <mkdir dir="${maven.localespi.release.dir}"/> |
| 842 | |
| 843 | |
| 844 | <!-- copy pom.xml with version --> |
| 845 | <copy file="${maven.pom.dir}/icu4j/pom.xml" todir="${maven.icu4j.release.dir}"> |
| 846 | <filterset> |
| 847 | <filter token="POMVERSION" value="${maven.pom.ver}"/> |
| 848 | </filterset> |
| 849 | </copy> |
| 850 | <copy file="${maven.pom.dir}/icu4j-charset/pom.xml" todir="${maven.charset.release.dir}"> |
| 851 | <filterset> |
| 852 | <filter token="POMVERSION" value="${maven.pom.ver}"/> |
| 853 | </filterset> |
| 854 | </copy> |
| 855 | <copy file="${maven.pom.dir}/icu4j-localespi/pom.xml" todir="${maven.localespi.release.dir}"> |
| 856 | <filterset> |
| 857 | <filter token="POMVERSION" value="${maven.pom.ver}"/> |
| 858 | </filterset> |
| 859 | </copy> |
| 860 | |
| 861 | <!-- copy ICU release binaries and source archive to the maven release directory --> |
| 862 | <copy file="${release.dir}/${icu4j.jar.versioned.file}" |
| 863 | tofile="${maven.icu4j.release.dir}/${maven.icu4j.jar.file}"/> |
| 864 | <copy file="${release.dir}/${icu4j-charset.jar.versioned.file}" |
| 865 | tofile="${maven.charset.release.dir}/${maven.charset.jar.file}"/> |
| 866 | <copy file="${release.dir}/${icu4j-localespi.jar.versioned.file}" |
| 867 | tofile="${maven.localespi.release.dir}/${maven.localespi.jar.file}"/> |
| 868 | |
| 869 | <copy file="${release.dir}/${icu4j-src.jar.versioned.file}" |
| 870 | tofile="${maven.icu4j.release.dir}/${maven.icu4j.src.jar.file}"/> |
| 871 | <copy file="${release.dir}/${icu4j-charset-src.jar.versioned.file}" |
| 872 | tofile="${maven.charset.release.dir}/${maven.charset.src.jar.file}"/> |
| 873 | <copy file="${release.dir}/${icu4j-localespi-src.jar.versioned.file}" |
| 874 | tofile="${maven.localespi.release.dir}/${maven.localespi.src.jar.file}"/> |
| 875 | |
| 876 | <!-- javadoc jar for maven release --> |
| 877 | <jar jarfile="${maven.icu4j.release.dir}/${maven.icu4j.doc.jar.file}" |
| 878 | compress="true" |
| 879 | basedir="${maven.doc.base.dir}/icu4j"/> |
| 880 | <jar jarfile="${maven.charset.release.dir}/${maven.charset.doc.jar.file}" |
| 881 | compress="true" |
| 882 | basedir="${maven.doc.base.dir}/charset"/> |
| 883 | <jar jarfile="${maven.localespi.release.dir}/${maven.localespi.doc.jar.file}" |
| 884 | compress="true" |
| 885 | basedir="${maven.doc.base.dir}/localespi"/> |
| 886 | |
| 887 | <!-- sign release files--> |
| 888 | <macrodef name="gpg"> |
| 889 | <attribute name="file"/> |
| 890 | <sequential> |
| 891 | <delete file="@{file}.asc" failonerror="false"/> |
| 892 | <exec executable="gpg"> |
| 893 | <arg value="-u"/> |
| 894 | <arg value="${gpg.user}"/> |
| 895 | <arg value="-ab"/> |
| 896 | <arg value="-o"/> |
| 897 | <arg value="@{file}.asc"/> |
| 898 | <arg value="@{file}"/> |
| 899 | </exec> |
| 900 | </sequential> |
| 901 | </macrodef> |
| 902 | |
| 903 | <gpg file="${maven.icu4j.release.dir}/pom.xml"/> |
| 904 | <gpg file="${maven.icu4j.release.dir}/${maven.icu4j.jar.file}"/> |
| 905 | <gpg file="${maven.icu4j.release.dir}/${maven.icu4j.src.jar.file}"/> |
| 906 | <gpg file="${maven.icu4j.release.dir}/${maven.icu4j.doc.jar.file}"/> |
| 907 | |
| 908 | <gpg file="${maven.charset.release.dir}/pom.xml"/> |
| 909 | <gpg file="${maven.charset.release.dir}/${maven.charset.jar.file}"/> |
| 910 | <gpg file="${maven.charset.release.dir}/${maven.charset.src.jar.file}"/> |
| 911 | <gpg file="${maven.charset.release.dir}/${maven.charset.doc.jar.file}"/> |
| 912 | |
| 913 | <gpg file="${maven.localespi.release.dir}/pom.xml"/> |
| 914 | <gpg file="${maven.localespi.release.dir}/${maven.localespi.jar.file}"/> |
| 915 | <gpg file="${maven.localespi.release.dir}/${maven.localespi.src.jar.file}"/> |
| 916 | <gpg file="${maven.localespi.release.dir}/${maven.localespi.doc.jar.file}"/> |
| 917 | |
| 918 | <!-- deploy ICU4J artifacts to the OSSRH staging repository --> |
| 919 | <path id="maven-ant-tasks.classpath" path="${maven-ant-tasks.jar}"/> |
| 920 | <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" |
| 921 | classpathref="maven-ant-tasks.classpath"/> |
| 922 | |
| 923 | <deploy xmlns="urn:maven-artifact-ant" file="${maven.icu4j.release.dir}/${maven.icu4j.jar.file}"> |
| 924 | <pom file="${maven.icu4j.release.dir}/pom.xml"/> |
| 925 | <attach file="${maven.icu4j.release.dir}/pom.xml.asc" type="pom.asc"/> |
| 926 | <attach file="${maven.icu4j.release.dir}/${maven.icu4j.jar.file}.asc" type="jar.asc"/> |
| 927 | <attach file="${maven.icu4j.release.dir}/${maven.icu4j.src.jar.file}" classifier="sources"/> |
| 928 | <attach file="${maven.icu4j.release.dir}/${maven.icu4j.src.jar.file}.asc" classifier="sources" type="jar.asc"/> |
| 929 | <attach file="${maven.icu4j.release.dir}/${maven.icu4j.doc.jar.file}" classifier="javadoc"/> |
| 930 | <attach file="${maven.icu4j.release.dir}/${maven.icu4j.doc.jar.file}.asc" classifier="javadoc" type="jar.asc"/> |
| 931 | </deploy> |
| 932 | |
| 933 | <deploy xmlns="urn:maven-artifact-ant" file="${maven.charset.release.dir}/${maven.charset.jar.file}"> |
| 934 | <pom file="${maven.charset.release.dir}/pom.xml"/> |
| 935 | <attach file="${maven.charset.release.dir}/pom.xml.asc" type="pom.asc"/> |
| 936 | <attach file="${maven.charset.release.dir}/${maven.charset.jar.file}.asc" type="jar.asc"/> |
| 937 | <attach file="${maven.charset.release.dir}/${maven.charset.src.jar.file}" classifier="sources"/> |
| 938 | <attach file="${maven.charset.release.dir}/${maven.charset.src.jar.file}.asc" classifier="sources" type="jar.asc"/> |
| 939 | <attach file="${maven.charset.release.dir}/${maven.charset.doc.jar.file}" classifier="javadoc"/> |
| 940 | <attach file="${maven.charset.release.dir}/${maven.charset.doc.jar.file}.asc" classifier="javadoc" type="jar.asc"/> |
| 941 | </deploy> |
| 942 | |
| 943 | <deploy xmlns="urn:maven-artifact-ant" file="${maven.localespi.release.dir}/${maven.localespi.jar.file}"> |
| 944 | <pom file="${maven.localespi.release.dir}/pom.xml"/> |
| 945 | <attach file="${maven.localespi.release.dir}/pom.xml.asc" type="pom.asc"/> |
| 946 | <attach file="${maven.localespi.release.dir}/${maven.localespi.jar.file}.asc" type="jar.asc"/> |
| 947 | <attach file="${maven.localespi.release.dir}/${maven.localespi.src.jar.file}" classifier="sources"/> |
| 948 | <attach file="${maven.localespi.release.dir}/${maven.localespi.src.jar.file}.asc" classifier="sources" type="jar.asc"/> |
| 949 | <attach file="${maven.localespi.release.dir}/${maven.localespi.doc.jar.file}" classifier="javadoc"/> |
| 950 | <attach file="${maven.localespi.release.dir}/${maven.localespi.doc.jar.file}.asc" classifier="javadoc" type="jar.asc"/> |
| 951 | </deploy> |
| 952 | </target> |
| 953 | |
| 954 | <target name="releaseVer" depends="info, releaseBinaries, releaseJarCheck, releaseSrcJars, releaseDocs, releaseSourceArchiveTgz" |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 955 | description="Build all ICU4J release files for distribution with versioned file names"> |
| 956 | <!-- binaries --> |
| 957 | <move file="${release.dir}/${icu4j.jar.file}" tofile="${release.dir}/${icu4j.jar.versioned.file}"/> |
| 958 | <move file="${release.dir}/${icu4j-charset.jar.file}" tofile="${release.dir}/${icu4j-charset.jar.versioned.file}"/> |
| 959 | <move file="${release.dir}/${icu4j-localespi.jar.file}" tofile="${release.dir}/${icu4j-localespi.jar.versioned.file}"/> |
| 960 | |
| 961 | <!-- source jars --> |
| 962 | <move file="${release.dir}/${icu4j-src.jar.file}" tofile="${release.dir}/${icu4j-src.jar.versioned.file}"/> |
| 963 | <move file="${release.dir}/${icu4j-charset-src.jar.file}" tofile="${release.dir}/${icu4j-charset-src.jar.versioned.file}"/> |
| 964 | <move file="${release.dir}/${icu4j-localespi-src.jar.file}" tofile="${release.dir}/${icu4j-localespi-src.jar.versioned.file}"/> |
| 965 | |
| 966 | <!-- docs --> |
| 967 | <move file="${release.dir}/${icu4jdocs.jar.file}" tofile="${release.dir}/${icu4jdocs.jar.versioned.file}"/> |
| 968 | |
| 969 | <!-- package archive --> |
| 970 | <move file="${release.dir}/${icu4jsrc.tgz.file}" tofile="${release.dir}/${icu4jsrc.tgz.versioned.file}"/> |
| 971 | |
| 972 | <!-- md5 checksum file --> |
| 973 | <mkdir dir="${out.dir}/checksum"/> |
| 974 | <delete dir="${out.dir}/checksum" includes="**/*"/> |
| 975 | |
| 976 | <checksum todir="${out.dir}/checksum" format="MD5SUM"> |
| 977 | <fileset dir="${release.dir}"> |
| 978 | <include name="*.jar"/> |
| 979 | <include name="*.tgz"/> |
| 980 | </fileset> |
| 981 | </checksum> |
| 982 | |
| 983 | <concat destfile="${release.dir}/icu4j-${release.file.ver}.md5"> |
| 984 | <fileset dir="${out.dir}/checksum" includes="*"/> |
| 985 | <filterchain> |
| 986 | <fixcrlf eol="lf"/> |
| 987 | </filterchain> |
| 988 | </concat> |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 989 | |
| 990 | <antcall target="_verify_config_for_release"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 991 | </target> |
| 992 | |
| 993 | <target name="release" depends="info, releaseBinaries, releaseSrcJars, releaseDocs, releaseSourceArchiveTgz" description="Build all ICU4J release files for distribution"> |
| 994 | <mkdir dir="${out.dir}/checksum"/> |
| 995 | <delete dir="${out.dir}/checksum" includes="**/*"/> |
| 996 | |
| 997 | <checksum todir="${out.dir}/checksum" format="MD5SUM"> |
| 998 | <fileset dir="${release.dir}"> |
| 999 | <include name="*.jar"/> |
| 1000 | <include name="*.tgz"/> |
| 1001 | </fileset> |
| 1002 | </checksum> |
| 1003 | |
| 1004 | <concat destfile="${release.dir}/icu4j.md5"> |
| 1005 | <fileset dir="${out.dir}/checksum" includes="*"/> |
| 1006 | <filterchain> |
| 1007 | <fixcrlf eol="lf"/> |
| 1008 | </filterchain> |
| 1009 | </concat> |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 1010 | |
| 1011 | <antcall target="_verify_config_for_release"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1012 | </target> |
| 1013 | |
| 1014 | <target name="releaseBinaries" depends="icu4jJar, charset, localespi" description="Build ICU4J binary files for distribution"> |
| 1015 | <mkdir dir="${release.dir}"/> |
| 1016 | <copy file="${icu4j.jar.file}" tofile="${release.dir}/${icu4j.jar.file}"/> |
| 1017 | <copy file="${icu4j.charset.jar}" tofile="${release.dir}/${icu4j-charset.jar.file}"/> |
| 1018 | <copy file="${icu4j.localespi.jar}" tofile="${release.dir}/${icu4j-localespi.jar.file}"/> |
| 1019 | </target> |
| 1020 | |
| 1021 | <target name="releaseSrcJars" depends="icu4jSrcJar" description="Build ICU4J src jar files for distribution"> |
| 1022 | <mkdir dir="${release.dir}"/> |
| 1023 | |
| 1024 | <!-- icu4j src-jar --> |
| 1025 | <copy file="${icu4j-src.jar.file}" tofile="${release.dir}/${icu4j-src.jar.file}"/> |
| 1026 | |
| 1027 | <!-- charset/localespi src-jar --> |
| 1028 | <ant dir="${icu4j.charset.dir}" target="src-jar" inheritAll="false"/> |
| 1029 | <ant dir="${icu4j.localespi.dir}" target="src-jar" inheritAll="false"/> |
| 1030 | |
| 1031 | <copy file="${icu4j.charset.dir}/${out.dir}/lib/${icu4j-charset-src.jar.file}" tofile="${release.dir}/${icu4j-charset-src.jar.file}"/> |
| 1032 | <copy file="${icu4j.localespi.dir}/${out.dir}/lib/${icu4j-localespi-src.jar.file}" tofile="${release.dir}/${icu4j-localespi-src.jar.file}"/> |
| 1033 | </target> |
| 1034 | |
| 1035 | |
| 1036 | <target name="releaseDocs" depends="docs" description="Build ICU4J API reference doc jar file for distribution"> |
| 1037 | <mkdir dir="${release.dir}"/> |
| 1038 | <jar jarfile="${release.dir}/${icu4jdocs.jar.file}" compress="true" basedir="${doc.dir}"/> |
| 1039 | </target> |
| 1040 | |
| 1041 | <property name="src.release.wrk.dir" value="${out.dir}/tmpsrc"/> |
| 1042 | |
| 1043 | <target name="releaseSourceArchiveZip" description="Build ICU4J source release archive (.zip)"> |
| 1044 | <delete dir="${src.release.wrk.dir}"/> |
| 1045 | <delete file="${icu4jsrc.zip.file}"/> |
| 1046 | |
| 1047 | <mkdir dir="${src.release.wrk.dir}"/> |
| 1048 | |
| 1049 | <fixcrlf srcdir="." |
| 1050 | destdir="${src.release.wrk.dir}" |
| 1051 | encoding="UTF-8" |
| 1052 | eol="crlf"> |
| 1053 | <include name="demos/**/*"/> |
| 1054 | <include name="main/**/*"/> |
| 1055 | <include name="perf-tests/**/*"/> |
| 1056 | <include name="samples/**/*"/> |
| 1057 | <include name="tools/**/*"/> |
| 1058 | <include name="*.html"/> |
| 1059 | <include name="*.xml"/> |
| 1060 | <include name="*.properties"/> |
| 1061 | <include name="*.css"/> |
| 1062 | <include name="*.stub"/> |
| 1063 | <exclude name="**/out/**/*"/> |
| 1064 | <exclude name="**/*.jar"/> |
| 1065 | <exclude name="**/build-local.properties"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1066 | <exclude name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/> |
| 1067 | <exclude name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/> |
| 1068 | <exclude name="tools/build/icu4j*.api*.gz"/> |
| 1069 | </fixcrlf> |
| 1070 | |
| 1071 | <mkdir dir="${release.dir}"/> |
| 1072 | <zip destfile="${release.dir}/${icu4jsrc.zip.file}"> |
| 1073 | <fileset dir="${src.release.wrk.dir}" includes="**/*"/> |
| 1074 | <fileset dir="${basedir}"> |
| 1075 | <include name="main/shared/data/*.jar"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1076 | <include name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/> |
| 1077 | <include name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/> |
| 1078 | <include name="tools/build/icu4j*.api*.gz"/> |
| 1079 | </fileset> |
| 1080 | </zip> |
| 1081 | |
| 1082 | <delete dir="${src.release.wrk.dir}"/> |
| 1083 | </target> |
| 1084 | |
| 1085 | <target name="releaseSourceArchiveTgz" description="Build ICU4J source release archive (.tgz)"> |
| 1086 | <delete dir="${src.release.wrk.dir}"/> |
| 1087 | <delete file="${icu4jsrc.tgz.file}"/> |
| 1088 | |
| 1089 | <mkdir dir="${src.release.wrk.dir}"/> |
| 1090 | |
| 1091 | <fixcrlf srcdir="." |
| 1092 | destdir="${src.release.wrk.dir}" |
| 1093 | encoding="UTF-8" |
| 1094 | eol="lf"> |
| 1095 | <include name="demos/**/*"/> |
| 1096 | <include name="main/**/*"/> |
Nikita Iashchenko | da0990f | 2019-06-13 19:36:45 +0100 | [diff] [blame^] | 1097 | <include name="maven/**/*"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1098 | <include name="perf-tests/**/*"/> |
| 1099 | <include name="samples/**/*"/> |
| 1100 | <include name="tools/**/*"/> |
| 1101 | <include name="*.html"/> |
| 1102 | <include name="*.xml"/> |
| 1103 | <include name="*.properties"/> |
| 1104 | <include name="*.css"/> |
| 1105 | <include name="*.stub"/> |
| 1106 | <exclude name="**/out/**/*"/> |
| 1107 | <exclude name="**/*.jar"/> |
| 1108 | <exclude name="**/build-local.properties"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1109 | <exclude name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/> |
| 1110 | <exclude name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/> |
| 1111 | <exclude name="tools/build/icu4j*.api*.gz"/> |
| 1112 | </fixcrlf> |
| 1113 | |
| 1114 | <property name="icu4jsrc.tar" value="${out.dir}/icu4jsrc.tar"/> |
| 1115 | |
| 1116 | <tar destfile="${icu4jsrc.tar}" longfile="gnu"> |
| 1117 | <fileset dir="${src.release.wrk.dir}" includes="**/*"/> |
| 1118 | <fileset dir="${basedir}"> |
| 1119 | <include name="main/shared/data/*.jar"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1120 | <include name="main/tests/core/src/com/ibm/icu/dev/test/serializable/data/**/*.dat"/> |
| 1121 | <include name="main/tests/core/src/com/ibm/icu/dev/test/util/Trie2Test.*.tri2"/> |
| 1122 | <include name="tools/build/icu4j*.api*.gz"/> |
| 1123 | </fileset> |
| 1124 | </tar> |
| 1125 | |
| 1126 | <mkdir dir="${release.dir}"/> |
| 1127 | <gzip destfile="${release.dir}/${icu4jsrc.tgz.file}" src="${icu4jsrc.tar}"/> |
| 1128 | |
| 1129 | <delete dir="${src.release.wrk.dir}"/> |
| 1130 | <delete file="${icu4jsrc.tar}"/> |
| 1131 | </target> |
| 1132 | |
| 1133 | <!-- findbugs targets --> |
| 1134 | |
| 1135 | <target name="findbugs" description="Run FindBugs on all library sub projects."> |
| 1136 | <property name="findbugs.out.dir" value="${out.dir}/findbugs"/> |
| 1137 | <mkdir dir="${findbugs.out.dir}"/> |
| 1138 | |
| 1139 | <ant dir="${icu4j.core.dir}" inheritAll="false" target="findbugs"/> |
| 1140 | <copy file="${icu4j.core.dir}/${out.dir}/fb-core.html" todir="${findbugs.out.dir}"/> |
| 1141 | |
| 1142 | <ant dir="${icu4j.collate.dir}" inheritAll="false" target="findbugs"/> |
| 1143 | <copy file="${icu4j.collate.dir}/${out.dir}/fb-collate.html" todir="${findbugs.out.dir}"/> |
| 1144 | |
| 1145 | <ant dir="${icu4j.currdata.dir}" inheritAll="false" target="findbugs"/> |
| 1146 | <copy file="${icu4j.currdata.dir}/${out.dir}/fb-currdata.html" todir="${findbugs.out.dir}"/> |
| 1147 | |
| 1148 | <ant dir="${icu4j.langdata.dir}" inheritAll="false" target="findbugs"/> |
| 1149 | <copy file="${icu4j.langdata.dir}/${out.dir}/fb-langdata.html" todir="${findbugs.out.dir}"/> |
| 1150 | |
| 1151 | <ant dir="${icu4j.regiondata.dir}" inheritAll="false" target="findbugs"/> |
| 1152 | <copy file="${icu4j.regiondata.dir}/${out.dir}/fb-regiondata.html" todir="${findbugs.out.dir}"/> |
| 1153 | |
| 1154 | <ant dir="${icu4j.translit.dir}" inheritAll="false" target="findbugs"/> |
| 1155 | <copy file="${icu4j.translit.dir}/${out.dir}/fb-translit.html" todir="${findbugs.out.dir}"/> |
| 1156 | |
| 1157 | |
| 1158 | <ant dir="${icu4j.charset.dir}" inheritAll="false" target="findbugs"/> |
| 1159 | <copy file="${icu4j.charset.dir}/${out.dir}/fb-charset.html" todir="${findbugs.out.dir}"/> |
| 1160 | |
| 1161 | <ant dir="${icu4j.localespi.dir}" inheritAll="false" target="findbugs"/> |
| 1162 | <copy file="${icu4j.localespi.dir}/${out.dir}/fb-localespi.html" todir="${findbugs.out.dir}"/> |
| 1163 | </target> |
| 1164 | |
| 1165 | <!-- compile targets --> |
| 1166 | <target name="core" description="Build core classes"> |
| 1167 | <ant dir="${icu4j.core.dir}" inheritAll="false"/> |
| 1168 | </target> |
| 1169 | |
| 1170 | <target name="collate" depends="core" description="Build collation classes"> |
| 1171 | <ant dir="${icu4j.collate.dir}" inheritAll="false"/> |
| 1172 | </target> |
| 1173 | |
| 1174 | <target name="charset" depends="core" description="Build charset classes"> |
| 1175 | <ant dir="${icu4j.charset.dir}" inheritAll="false"/> |
| 1176 | </target> |
| 1177 | |
| 1178 | <target name="currdata" depends="core" description="Build currency data classes"> |
| 1179 | <ant dir="${icu4j.currdata.dir}" inheritAll="false"/> |
| 1180 | </target> |
| 1181 | |
| 1182 | <target name="langdata" depends="core" description="Build language data classes"> |
| 1183 | <ant dir="${icu4j.langdata.dir}" inheritAll="false"/> |
| 1184 | </target> |
| 1185 | |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1186 | <target name="localespi" depends="core, collate, currdata, langdata, regiondata" description="Build Locale SPI classes"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1187 | <ant dir="${icu4j.localespi.dir}" inheritAll="false"/> |
| 1188 | </target> |
| 1189 | |
| 1190 | <target name="regiondata" depends="core" description="Build region data classes"> |
| 1191 | <ant dir="${icu4j.regiondata.dir}" inheritAll="false"/> |
| 1192 | </target> |
| 1193 | |
| 1194 | <target name="translit" depends="core" description="Build translit classes"> |
| 1195 | <ant dir="${icu4j.translit.dir}" inheritAll="false"/> |
| 1196 | </target> |
| 1197 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1198 | <target name="test-framework" depends="core, init" description="Build test framework classes"> |
| 1199 | <ant dir="${icu4j.test-framework.dir}" inheritAll="false"> |
| 1200 | <reference refid="junit.jars"/> |
| 1201 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1202 | </target> |
| 1203 | |
| 1204 | <target name="core-tests" depends="core, test-framework" description="Build core tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1205 | <ant dir="${icu4j.core-tests.dir}" inheritAll="false"> |
| 1206 | <reference refid="junit.jars"/> |
| 1207 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1208 | </target> |
| 1209 | |
| 1210 | <target name="collate-tests" depends="collate, test-framework" description="Build core tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1211 | <ant dir="${icu4j.collate-tests.dir}" inheritAll="false"> |
| 1212 | <reference refid="junit.jars"/> |
| 1213 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1214 | </target> |
| 1215 | |
| 1216 | <target name="charset-tests" depends="charset, test-framework" description="Build charset tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1217 | <ant dir="${icu4j.charset-tests.dir}" inheritAll="false"> |
| 1218 | <reference refid="junit.jars"/> |
| 1219 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1220 | </target> |
| 1221 | |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1222 | <target name="localespi-tests" depends="localespi, test-framework" description="Build Locale SPI tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1223 | <ant dir="${icu4j.localespi-tests.dir}" inheritAll="false"> |
| 1224 | <reference refid="junit.jars"/> |
| 1225 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1226 | </target> |
| 1227 | |
| 1228 | <target name="packaging-tests" depends="test-framework" description="Build packaging tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1229 | <ant dir="${icu4j.packaging-tests.dir}" inheritAll="false"> |
| 1230 | <reference refid="junit.jars"/> |
| 1231 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1232 | </target> |
| 1233 | |
| 1234 | <target name="translit-tests" depends="translit, test-framework" description="Build translit tests"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1235 | <ant dir="${icu4j.translit-tests.dir}" inheritAll="false"> |
| 1236 | <reference refid="junit.jars"/> |
| 1237 | </ant> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1238 | </target> |
| 1239 | |
| 1240 | <target name="demos" depends="core, charset, translit" description="Build demo classes"> |
| 1241 | <ant dir="${icu4j.demos.dir}" inheritAll="false"/> |
| 1242 | </target> |
| 1243 | |
| 1244 | <target name="samples" depends="core, charset, collate, translit" description="Build sample classes"> |
| 1245 | <ant dir="${icu4j.samples.dir}" inheritAll="false"/> |
| 1246 | </target> |
| 1247 | |
| 1248 | <target name="build-tools" description="Build build-tool classes"> |
| 1249 | <ant dir="${icu4j.build-tools.dir}" inheritAll="false"/> |
| 1250 | </target> |
| 1251 | |
| 1252 | <target name="tools" depends="core, core-tests, collate, translit, translit-tests" description="Build tool classes"> |
| 1253 | <ant dir="${icu4j.tools.dir}" inheritAll="false"/> |
| 1254 | </target> |
| 1255 | |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1256 | <target name="perf-tests" depends="core, charset, collate, tools" description="Build performance test classes"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1257 | <ant dir="${icu4j.perf-tests.dir}" inheritAll="false"/> |
| 1258 | </target> |
| 1259 | |
| 1260 | <!-- doc targets --> |
| 1261 | <target name="docs" depends="info, build-tools, _checkJCite, _docsWithJCite, _docsWithoutJCite" description="Build API documents"/> |
| 1262 | |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1263 | <target name="docsStrict" description="Build API documents with all doclint check enabled"> |
| 1264 | <condition property="doclint.option" value="-Xdoclint:all"> |
| 1265 | <isset property="is.java8.plus"/> |
| 1266 | </condition> |
| 1267 | <antcall target="docs"/> |
| 1268 | </target> |
| 1269 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1270 | <target name="_checkJCite" if="env.JCITE_DIR"> |
| 1271 | <fileset dir="${env.JCITE_DIR}" id="jcite.files"> |
| 1272 | <include name="build/*.jar"/> |
| 1273 | <include name="lib/*.jar"/> |
| 1274 | </fileset> |
| 1275 | <pathconvert property="jcite.libs" refid="jcite.files"/> |
| 1276 | |
| 1277 | <dirset dir="${basedir}" id="jcite.src.dirs"> |
| 1278 | <include name="samples/src"/> |
| 1279 | <include name="demos/src"/> |
| 1280 | <include name="main/tests/*/src"/> |
| 1281 | </dirset> |
| 1282 | <pathconvert property="jcite.addl.src" refid="jcite.src.dirs"/> |
| 1283 | </target> |
| 1284 | |
| 1285 | <target name="_docsStyleSheet"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1286 | <condition property="docs.style.sheet" value="stylesheet7.css"> |
| 1287 | <isset property="is.java7"/> |
| 1288 | </condition> |
| 1289 | <!-- all other cases --> |
| 1290 | <property name="docs.style.sheet" value="stylesheet8.css"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1291 | </target> |
| 1292 | |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1293 | <target name="_docsLintOption" unless="doclint.options"> |
| 1294 | <!-- syntax check is disabled because JCite tag name "@.jcite" is invalidated --> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1295 | <condition property="doclint.option" value="-Xdoclint:reference,html" else=""> |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1296 | <isset property="is.java8.plus"/> |
| 1297 | </condition> |
Fredrik Roubert | bd1cbb6 | 2015-09-28 21:14:09 +0200 | [diff] [blame] | 1298 | </target> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1299 | |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1300 | <target name="_docsWithJCite" depends="_docsStyleSheet, _docsLintOption" if="jcite.libs"> |
| 1301 | <echo message="Javadoc lint option: ${doclint.option}"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1302 | <echo message="JCite library path: ${jcite.libs}"/> |
| 1303 | <echo message="JCite additional source path: ${jcite.addl.src}"/> |
| 1304 | <echo message="Custom stylesheet: ${docs.style.sheet}"/> |
| 1305 | <javadoc |
| 1306 | destdir="${doc.dir}" |
| 1307 | nodeprecatedlist="true" |
| 1308 | windowtitle="${icu4j.api.doc.window.title}" |
| 1309 | doctitle="${icu4j.api.doc.title}" |
| 1310 | header="${icu4j.api.doc.header}" |
| 1311 | encoding="${java.src.encoding}" |
| 1312 | docencoding="UTF-8" |
| 1313 | charset="UTF-8" |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 1314 | bottom="${icu4j.api.doc.copyright.footer}" |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1315 | additionalparam="${doclint.option} -breakiterator -use -tagletpath ${icu4j.build-tools.jar}${path.separator}${jcite.libs} -taglet com.ibm.icu.dev.tool.docs.ICUTaglet -taglet ch.arrenbrecht.jcite.JCiteTaglet -J-Djcitesourcepath=${jcite.addl.src} -J-Dfile.encoding=UTF-8" |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1316 | link="${icu4j.api.doc.jdk.link}" |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1317 | source="1.7" |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1318 | stylesheetfile="${docs.style.sheet}" |
| 1319 | failonerror="true"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1320 | <packageset dir="${icu4j.core.dir}/src"> |
| 1321 | <include name="com/ibm/icu/lang/**"/> |
| 1322 | <include name="com/ibm/icu/math/**"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1323 | <include name="com/ibm/icu/number/**"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1324 | <include name="com/ibm/icu/text/**"/> |
| 1325 | <include name="com/ibm/icu/util/**"/> |
| 1326 | </packageset> |
| 1327 | <packageset dir="${icu4j.collate.dir}/src"> |
| 1328 | <include name="com/ibm/icu/text/**"/> |
| 1329 | </packageset> |
| 1330 | <packageset dir="${icu4j.translit.dir}/src"> |
| 1331 | <include name="com/ibm/icu/text/**"/> |
| 1332 | </packageset> |
| 1333 | <packageset dir="${icu4j.charset.dir}/src"> |
| 1334 | <include name="com/ibm/icu/charset/**"/> |
| 1335 | </packageset> |
| 1336 | </javadoc> |
| 1337 | </target> |
| 1338 | |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1339 | <target name="_docsWithoutJCite" depends="_docsStyleSheet, _docsLintOption" unless="jcite.libs"> |
| 1340 | <echo message="Javadoc lint option: ${doclint.option}"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1341 | <javadoc |
| 1342 | destdir="${doc.dir}" |
| 1343 | nodeprecatedlist="true" |
| 1344 | windowtitle="${icu4j.api.doc.window.title}" |
| 1345 | doctitle="${icu4j.api.doc.title}" |
| 1346 | header="${icu4j.api.doc.header}" |
| 1347 | encoding="${java.src.encoding}" |
| 1348 | docencoding="UTF-8" |
| 1349 | charset="UTF-8" |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 1350 | bottom="${icu4j.api.doc.copyright.footer}" |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1351 | additionalparam="${doclint.option} -breakiterator -use -tagletpath ${icu4j.build-tools.jar} -taglet com.ibm.icu.dev.tool.docs.ICUTaglet" |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1352 | link="${icu4j.api.doc.jdk.link}" |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1353 | source="1.7" |
Fredrik Roubert | 87255a3 | 2016-03-10 13:15:46 +0100 | [diff] [blame] | 1354 | failonerror="true"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1355 | <packageset dir="${icu4j.core.dir}/src"> |
| 1356 | <include name="com/ibm/icu/lang/**"/> |
| 1357 | <include name="com/ibm/icu/math/**"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1358 | <include name="com/ibm/icu/number/**"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1359 | <include name="com/ibm/icu/text/**"/> |
| 1360 | <include name="com/ibm/icu/util/**"/> |
| 1361 | </packageset> |
| 1362 | <packageset dir="${icu4j.collate.dir}/src"> |
| 1363 | <include name="com/ibm/icu/text/**"/> |
| 1364 | </packageset> |
| 1365 | <packageset dir="${icu4j.translit.dir}/src"> |
| 1366 | <include name="com/ibm/icu/text/**"/> |
| 1367 | </packageset> |
| 1368 | <packageset dir="${icu4j.charset.dir}/src"> |
| 1369 | <include name="com/ibm/icu/charset/**"/> |
| 1370 | </packageset> |
| 1371 | </javadoc> |
| 1372 | </target> |
| 1373 | |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1374 | <!-- Component document targets, only used for Maven repository releases --> |
| 1375 | <target name="docsMaven" depends="info, build-tools, _checkJCite, _docsStyleSheet, _docsLintOption, _mavenIcu4jDoc, _mavenCharsetDoc, _mavenLocalespiDoc" |
| 1376 | description="Build API docs for each ICU4J maven artifact"/> |
| 1377 | |
| 1378 | <target name="_mavenIcu4jDoc"> |
| 1379 | <fail message="JCite must be configured." unless="jcite.libs"/> |
| 1380 | <delete dir="${maven.doc.base.dir}/icu4j"/> |
| 1381 | |
| 1382 | <echo message="Javadoc lint option: ${doclint.option}"/> |
| 1383 | <echo message="JCite library path: ${jcite.libs}"/> |
| 1384 | <echo message="JCite additional source path: ${jcite.addl.src}"/> |
| 1385 | <echo message="Custom stylesheet: ${docs.style.sheet}"/> |
| 1386 | <javadoc |
| 1387 | destdir="${maven.doc.base.dir}/icu4j" |
| 1388 | nodeprecatedlist="true" |
| 1389 | windowtitle="${icu4j.main.api.doc.window.title}" |
| 1390 | doctitle="${icu4j.main.api.doc.title}" |
| 1391 | header="${icu4j.main.api.doc.header}" |
| 1392 | encoding="${java.src.encoding}" |
| 1393 | docencoding="UTF-8" |
| 1394 | charset="UTF-8" |
| 1395 | bottom="${icu4j.api.doc.copyright.footer}" |
| 1396 | additionalparam="${doclint.option} -breakiterator -use -tagletpath ${icu4j.build-tools.jar}${path.separator}${jcite.libs} -taglet com.ibm.icu.dev.tool.docs.ICUTaglet -taglet ch.arrenbrecht.jcite.JCiteTaglet -J-Djcitesourcepath=${jcite.addl.src} -J-Dfile.encoding=UTF-8" |
| 1397 | link="${icu4j.api.doc.jdk.link}" |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1398 | source="1.7" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1399 | stylesheetfile="${docs.style.sheet}" |
| 1400 | failonerror="true"> |
| 1401 | <packageset dir="${icu4j.core.dir}/src"> |
| 1402 | <include name="com/ibm/icu/lang/**"/> |
| 1403 | <include name="com/ibm/icu/math/**"/> |
| 1404 | <include name="com/ibm/icu/number/**"/> |
| 1405 | <include name="com/ibm/icu/text/**"/> |
| 1406 | <include name="com/ibm/icu/util/**"/> |
| 1407 | </packageset> |
| 1408 | <packageset dir="${icu4j.collate.dir}/src"> |
| 1409 | <include name="com/ibm/icu/text/**"/> |
| 1410 | </packageset> |
| 1411 | <packageset dir="${icu4j.translit.dir}/src"> |
| 1412 | <include name="com/ibm/icu/text/**"/> |
| 1413 | </packageset> |
| 1414 | </javadoc> |
| 1415 | </target> |
| 1416 | |
| 1417 | <target name="_mavenCharsetDoc"> |
| 1418 | <fail message="JCite must be configured." unless="jcite.libs"/> |
| 1419 | <delete dir="${maven.doc.base.dir}/charset"/> |
| 1420 | |
| 1421 | <echo message="Javadoc lint option: ${doclint.option}"/> |
| 1422 | <echo message="JCite library path: ${jcite.libs}"/> |
| 1423 | <echo message="JCite additional source path: ${jcite.addl.src}"/> |
| 1424 | <echo message="Custom stylesheet: ${docs.style.sheet}"/> |
| 1425 | <javadoc |
| 1426 | destdir="${maven.doc.base.dir}/charset" |
| 1427 | nodeprecatedlist="true" |
| 1428 | windowtitle="${icu4j.charset.api.doc.window.title}" |
| 1429 | doctitle="${icu4j.charset.api.doc.title}" |
| 1430 | header="${icu4j.charset.api.doc.header}" |
| 1431 | encoding="${java.src.encoding}" |
| 1432 | docencoding="UTF-8" |
| 1433 | charset="UTF-8" |
| 1434 | bottom="${icu4j.api.doc.copyright.footer}" |
| 1435 | additionalparam="${doclint.option} -breakiterator -use -tagletpath ${icu4j.build-tools.jar}${path.separator}${jcite.libs} -taglet com.ibm.icu.dev.tool.docs.ICUTaglet -taglet ch.arrenbrecht.jcite.JCiteTaglet -J-Djcitesourcepath=${jcite.addl.src} -J-Dfile.encoding=UTF-8" |
| 1436 | link="${icu4j.api.doc.jdk.link}" |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1437 | source="1.7" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1438 | stylesheetfile="${docs.style.sheet}" |
| 1439 | failonerror="true" |
| 1440 | classpath="${icu4j.jar.file}"> |
| 1441 | <packageset dir="${icu4j.charset.dir}/src"> |
| 1442 | <include name="com/ibm/icu/charset/**"/> |
| 1443 | </packageset> |
| 1444 | </javadoc> |
| 1445 | </target> |
| 1446 | |
| 1447 | <target name="_mavenLocalespiDoc"> |
| 1448 | <delete dir="${maven.doc.base.dir}/localespi"/> |
| 1449 | |
| 1450 | <echo message="Javadoc lint option: ${doclint.option}"/> |
| 1451 | <echo message="Custom stylesheet: ${docs.style.sheet}"/> |
| 1452 | <javadoc |
| 1453 | destdir="${maven.doc.base.dir}/localespi" |
| 1454 | nodeprecatedlist="true" |
| 1455 | windowtitle="${icu4j.localespi.api.doc.window.title}" |
| 1456 | doctitle="${icu4j.localespi.api.doc.title}" |
| 1457 | header="${icu4j.localespi.api.doc.header}" |
| 1458 | encoding="${java.src.encoding}" |
| 1459 | docencoding="UTF-8" |
| 1460 | charset="UTF-8" |
| 1461 | bottom="${icu4j.api.doc.copyright.footer}" |
| 1462 | additionalparam="${doclint.option} -breakiterator -use" |
| 1463 | link="${icu4j.api.doc.jdk.link}" |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1464 | source="1.7" |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1465 | failonerror="true" |
| 1466 | classpath="${icu4j.jar.file}"> |
| 1467 | <packageset dir="${icu4j.localespi.dir}/src"> |
| 1468 | <include name="com/ibm/icu/impl/javaspi"/> |
| 1469 | </packageset> |
| 1470 | </javadoc> |
| 1471 | |
| 1472 | </target> |
| 1473 | |
| 1474 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1475 | <!-- JaCoCo code coverage target --> |
| 1476 | <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" onerror="ignore"> |
| 1477 | <classpath path="${env.JACOCO_DIR}/lib/jacocoant.jar"/> |
| 1478 | </taskdef> |
| 1479 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1480 | <target name="coverageJaCoCo" depends="build-tools, jar, tests" description="Run the ICU4J unit tests and generate code coverage report"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1481 | <property name="jacoco.out.dir" value="${out.dir}/jacoco"/> |
| 1482 | <property name="jacoco.exec.data.file" value="${jacoco.out.dir}/jacoco.exec"/> |
| 1483 | <property name="jacoco.report.html.zip" value="${jacoco.out.dir}/report_html.zip"/> |
| 1484 | <property name="jacoco.report.xml" value="${jacoco.out.dir}/report.xml"/> |
| 1485 | <property name="jacoco.report.csv" value="${jacoco.out.dir}/report.csv"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1486 | <property name="jacoco.exclusion.txt" value="coverage-exclusion.txt"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1487 | |
| 1488 | <delete dir="${jacoco.out.dir}"/> |
| 1489 | <mkdir dir="${jacoco.out.dir}"/> |
| 1490 | |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1491 | <!-- core --> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1492 | <jacoco:coverage destfile="${jacoco.exec.data.file}"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1493 | <junit fork="yes" forkmode="once" printsummary="yes" haltonfailure="no"> |
| 1494 | <jvmarg value="-ea"/> |
| 1495 | <jvmarg value="-Djava.awt.headless=true"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1496 | <classpath> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1497 | <path refid="junit.jars"/> |
| 1498 | <path refid="junit.icu.jars"/> |
| 1499 | </classpath> |
| 1500 | |
| 1501 | <batchtest todir="${junit.out.dir}/core"> |
| 1502 | <fileset dir="${icu4j.core-tests.dir}/${bin.dir}"> |
| 1503 | <patternset refid="test-classes-patternset"/> |
| 1504 | </fileset> |
| 1505 | </batchtest> |
| 1506 | </junit> |
| 1507 | </jacoco:coverage> |
| 1508 | |
| 1509 | <!-- charset --> |
| 1510 | <jacoco:coverage destfile="${jacoco.exec.data.file}"> |
| 1511 | <junit fork="yes" forkmode="once" printsummary="yes" haltonfailure="no"> |
| 1512 | <jvmarg value="-ea"/> |
| 1513 | <jvmarg value="-Djava.awt.headless=true"/> |
| 1514 | <classpath> |
| 1515 | <path refid="junit.jars"/> |
| 1516 | <path refid="junit.icu.jars"/> |
| 1517 | </classpath> |
| 1518 | |
| 1519 | <batchtest todir="${junit.out.dir}/charset"> |
| 1520 | <fileset dir="${icu4j.charset-tests.dir}/${bin.dir}"> |
| 1521 | <patternset refid="test-classes-patternset"/> |
| 1522 | </fileset> |
| 1523 | </batchtest> |
| 1524 | </junit> |
| 1525 | </jacoco:coverage> |
| 1526 | |
| 1527 | <!-- collate --> |
| 1528 | <jacoco:coverage destfile="${jacoco.exec.data.file}"> |
| 1529 | <junit fork="yes" forkmode="once" printsummary="yes" haltonfailure="no"> |
| 1530 | <jvmarg value="-ea"/> |
| 1531 | <jvmarg value="-Djava.awt.headless=true"/> |
| 1532 | <classpath> |
| 1533 | <path refid="junit.jars"/> |
| 1534 | <path refid="junit.icu.jars"/> |
| 1535 | </classpath> |
| 1536 | |
| 1537 | <batchtest todir="${junit.out.dir}/collate"> |
| 1538 | <fileset dir="${icu4j.collate-tests.dir}/${bin.dir}"> |
| 1539 | <patternset refid="test-classes-patternset"/> |
| 1540 | </fileset> |
| 1541 | </batchtest> |
| 1542 | </junit> |
| 1543 | </jacoco:coverage> |
| 1544 | |
| 1545 | <!-- translit --> |
| 1546 | <jacoco:coverage destfile="${jacoco.exec.data.file}"> |
| 1547 | <junit fork="yes" forkmode="once" printsummary="yes" haltonfailure="no"> |
| 1548 | <jvmarg value="-ea"/> |
| 1549 | <jvmarg value="-Djava.awt.headless=true"/> |
| 1550 | <classpath> |
| 1551 | <path refid="junit.jars"/> |
| 1552 | <path refid="junit.icu.jars"/> |
| 1553 | </classpath> |
| 1554 | |
| 1555 | <batchtest todir="${junit.out.dir}/translit"> |
| 1556 | <fileset dir="${icu4j.translit-tests.dir}/${bin.dir}"> |
| 1557 | <patternset refid="test-classes-patternset"/> |
| 1558 | </fileset> |
| 1559 | </batchtest> |
| 1560 | </junit> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1561 | </jacoco:coverage> |
| 1562 | |
| 1563 | <jacoco:report> |
| 1564 | <executiondata> |
| 1565 | <file file="${jacoco.exec.data.file}"/> |
| 1566 | </executiondata> |
| 1567 | |
| 1568 | <structure name="ICU4J Project"> |
| 1569 | <classfiles> |
| 1570 | <fileset dir="."> |
| 1571 | <include name="${icu4j.jar.file}"/> |
| 1572 | <include name="${icu4j-charset.jar.file}"/> |
| 1573 | </fileset> |
| 1574 | </classfiles> |
| 1575 | <sourcefiles encoding="UTF-8"> |
| 1576 | <fileset dir="${icu4j.core.dir}/src"/> |
| 1577 | <fileset dir="${icu4j.collate.dir}/src"/> |
| 1578 | <fileset dir="${icu4j.currdata.dir}/src"/> |
| 1579 | <fileset dir="${icu4j.langdata.dir}/src"/> |
| 1580 | <fileset dir="${icu4j.regiondata.dir}/src"/> |
| 1581 | <fileset dir="${icu4j.translit.dir}/src"/> |
| 1582 | |
| 1583 | <fileset dir="${icu4j.charset.dir}/src"/> |
| 1584 | </sourcefiles> |
| 1585 | </structure> |
| 1586 | |
| 1587 | <html destfile="${jacoco.report.html.zip}"/> |
| 1588 | <xml destfile="${jacoco.report.xml}"/> |
| 1589 | <csv destfile="${jacoco.report.csv}"/> |
| 1590 | </jacoco:report> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1591 | |
| 1592 | <java classname="com.ibm.icu.dev.tool.coverage.JacocoReportCheck" failonerror="true"> |
| 1593 | <arg line="${jacoco.report.xml} ${jacoco.exclusion.txt}"/> |
| 1594 | <classpath> |
| 1595 | <pathelement location="${icu4j.build-tools.jar}"/> |
| 1596 | </classpath> |
| 1597 | </java> |
| 1598 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1599 | </target> |
| 1600 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1601 | <!-- Release management targets --> |
| 1602 | <target name="checktags" depends="info, build-tools" description="Check API tags before release"> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1603 | <javadoc source="1.7" |
| 1604 | bootclasspath="${java7.bootclasspath}" |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1605 | encoding="${java.src.encoding}"> |
| 1606 | <packageset dir="${icu4j.core.dir}/src"> |
| 1607 | <include name="com/ibm/icu/lang/**"/> |
| 1608 | <include name="com/ibm/icu/math/**"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1609 | <include name="com/ibm/icu/number/**"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1610 | <include name="com/ibm/icu/text/**"/> |
| 1611 | <include name="com/ibm/icu/util/**"/> |
| 1612 | </packageset> |
| 1613 | <packageset dir="${icu4j.collate.dir}/src"> |
| 1614 | <include name="com/ibm/icu/**"/> |
| 1615 | </packageset> |
| 1616 | <packageset dir="${icu4j.charset.dir}/src"> |
| 1617 | <include name="com/ibm/icu/charset/**"/> |
| 1618 | </packageset> |
| 1619 | <doclet name="com.ibm.icu.dev.tool.docs.CheckTags" path="${icu4j.build-tools.jar}"/> |
| 1620 | </javadoc> |
| 1621 | </target> |
| 1622 | |
| 1623 | <target name="gatherapi" depends="info, build-tools" description="Run API database generator tool"> |
| 1624 | <mkdir dir="${out.dir}"/> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1625 | <javadoc source="1.7" |
| 1626 | bootclasspath="${java7.bootclasspath}" |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1627 | encoding="${java.src.encoding}"> |
| 1628 | <packageset dir="${icu4j.core.dir}/src"> |
| 1629 | <include name="com/ibm/icu/lang/**"/> |
| 1630 | <include name="com/ibm/icu/math/**"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1631 | <include name="com/ibm/icu/number/**"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1632 | <include name="com/ibm/icu/text/**"/> |
| 1633 | <include name="com/ibm/icu/util/**"/> |
| 1634 | </packageset> |
| 1635 | <packageset dir="${icu4j.collate.dir}/src"> |
| 1636 | <include name="com/ibm/icu/text/**"/> |
| 1637 | <include name="com/ibm/icu/util/**"/> |
| 1638 | </packageset> |
| 1639 | <packageset dir="${icu4j.charset.dir}/src"> |
| 1640 | <include name="com/ibm/icu/charset/**"/> |
| 1641 | </packageset> |
| 1642 | <packageset dir="${icu4j.translit.dir}/src"> |
| 1643 | <include name="com/ibm/icu/text/**"/> |
| 1644 | </packageset> |
| 1645 | <doclet name="com.ibm.icu.dev.tool.docs.GatherAPIData" path="${icu4j.build-tools.jar}"> |
| 1646 | <param name="-name" value="ICU4J ${icu4j.impl.version}"/> |
| 1647 | <param name="-output" value="${out.dir}/icu4j${api.report.version}.api3"/> |
| 1648 | <param name="-internal"/> |
| 1649 | <param name="-version"/> |
| 1650 | <param name="-gzip"/> |
| 1651 | </doclet> |
| 1652 | </javadoc> |
| 1653 | </target> |
| 1654 | |
| 1655 | <target name="apireport" depends="info, gatherapi" description="Run API report generator tool"> |
| 1656 | <java classname="com.ibm.icu.dev.tool.docs.ReportAPI" |
| 1657 | classpath="${icu4j.build-tools.jar}" |
| 1658 | failonerror="true"> |
| 1659 | <arg value="-old:" /> |
| 1660 | <arg value="${icu4j.build-tools.dir}/icu4j${api.report.prev.version}.api3.gz" /> |
| 1661 | <arg value="-new:" /> |
| 1662 | <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" /> |
| 1663 | <arg value="-html" /> |
| 1664 | <arg value="-out:" /> |
| 1665 | <arg value="${out.dir}/icu4j_compare_${api.report.prev.version}_${api.report.version}.html" /> |
| 1666 | </java> |
| 1667 | </target> |
| 1668 | |
| 1669 | <target name="gatherapiOld" depends="info, build-tools" description="Run API database generator tool (Pre Java 5 style)"> |
| 1670 | <mkdir dir="${out.dir}"/> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1671 | <javadoc source="1.7" |
| 1672 | bootclasspath="${java7.bootclasspath}" |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1673 | encoding="${java.src.encoding}"> |
| 1674 | <packageset dir="${icu4j.core.dir}/src"> |
| 1675 | <include name="com/ibm/icu/lang/**"/> |
| 1676 | <include name="com/ibm/icu/math/**"/> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 1677 | <include name="com/ibm/icu/number/**"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1678 | <include name="com/ibm/icu/text/**"/> |
| 1679 | <include name="com/ibm/icu/util/**"/> |
| 1680 | </packageset> |
| 1681 | <packageset dir="${icu4j.collate.dir}/src"> |
| 1682 | <include name="com/ibm/icu/text/**"/> |
| 1683 | <include name="com/ibm/icu/util/**"/> |
| 1684 | </packageset> |
| 1685 | <packageset dir="${icu4j.charset.dir}/src"> |
| 1686 | <include name="com/ibm/icu/charset/**"/> |
| 1687 | </packageset> |
| 1688 | <packageset dir="${icu4j.translit.dir}/src"> |
| 1689 | <include name="com/ibm/icu/text/**"/> |
| 1690 | </packageset> |
| 1691 | <doclet name="com.ibm.icu.dev.tool.docs.GatherAPIDataOld" path="${icu4j.build-tools.jar}"> |
| 1692 | <param name="-name" value="ICU4J ${icu4j.impl.version}"/> |
| 1693 | <param name="-output" value="${out.dir}/icu4j${api.report.version}.api"/> |
| 1694 | <param name="-internal"/> |
| 1695 | <param name="-gzip"/> |
| 1696 | </doclet> |
| 1697 | </javadoc> |
| 1698 | </target> |
| 1699 | |
| 1700 | <target name="apireportOld" depends="info, gatherapiOld" description="Run API report generator tool (Pre Java 5 Style)"> |
| 1701 | <java classname="com.ibm.icu.dev.tool.docs.ReportAPI" |
| 1702 | classpath="${icu4j.build-tools.jar}" |
| 1703 | failonerror="true"> |
| 1704 | <arg value="-old:" /> |
| 1705 | <arg value="${icu4j.build-tools.dir}/icu4j${api.report.prev.version}.api.gz" /> |
| 1706 | <arg value="-new:" /> |
| 1707 | <arg value="${out.dir}/icu4j${api.report.version}.api.gz" /> |
| 1708 | <arg value="-html" /> |
| 1709 | <arg value="-internal" /> |
| 1710 | <arg value="-out:" /> |
| 1711 | <arg value="${out.dir}/icu4j_compare_${api.report.prev.version}_${api.report.version}.html" /> |
| 1712 | </java> |
| 1713 | </target> |
| 1714 | |
| 1715 | <target name="checkDeprecated" depends="info, build-tools, gatherapi, main" |
| 1716 | description="Check consistency between javadoc @deprecated and @Deprecated annotation"> |
| 1717 | <java classname="com.ibm.icu.dev.tool.docs.DeprecatedAPIChecker" |
| 1718 | failonerror="true"> |
| 1719 | <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" /> |
| 1720 | <classpath> |
| 1721 | <pathelement location="${icu4j.build-tools.jar}"/> |
| 1722 | <pathelement location="${icu4j.core.jar}"/> |
| 1723 | <pathelement location="${icu4j.collate.jar}"/> |
| 1724 | <pathelement location="${icu4j.charset.jar}"/> |
| 1725 | <pathelement location="${icu4j.currdata.jar}"/> |
| 1726 | <pathelement location="${icu4j.langdata.jar}"/> |
| 1727 | <pathelement location="${icu4j.regiondata.jar}"/> |
| 1728 | <pathelement location="${icu4j.translit.jar}"/> |
| 1729 | </classpath> |
| 1730 | </java> |
| 1731 | </target> |
| 1732 | |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 1733 | <target name="checkAPIStatusConsistency" depends="info, build-tools, gatherapi" |
| 1734 | description="Check consistency between API class status and methods overriding java.lang.Object"> |
| 1735 | <!-- |
| 1736 | If you need classes excluded from this check, define followig property in build-local.properties. |
| 1737 | e.g. checkAPIStatusConsistency.skip.classes=com.ibm.icu.text.Normalizer;com.ibm.icu.util.ULocale |
| 1738 | --> |
| 1739 | <property name="checkAPIStatusConsistency.skip.classes" value=""/> |
| 1740 | <java classname="com.ibm.icu.dev.tool.docs.APIStatusConsistencyChecker" |
| 1741 | failonerror="true"> |
| 1742 | <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" /> |
| 1743 | <arg value="${checkAPIStatusConsistency.skip.classes}" /> |
| 1744 | <classpath> |
| 1745 | <pathelement location="${icu4j.build-tools.jar}"/> |
| 1746 | <pathelement location="${icu4j.core.jar}"/> |
| 1747 | <pathelement location="${icu4j.collate.jar}"/> |
| 1748 | <pathelement location="${icu4j.charset.jar}"/> |
| 1749 | <pathelement location="${icu4j.currdata.jar}"/> |
| 1750 | <pathelement location="${icu4j.langdata.jar}"/> |
| 1751 | <pathelement location="${icu4j.regiondata.jar}"/> |
| 1752 | <pathelement location="${icu4j.translit.jar}"/> |
| 1753 | </classpath> |
| 1754 | </java> |
| 1755 | </target> |
| 1756 | |
| 1757 | <target name="checkAPIStatus" depends="checkAPIStatusConsistency, checkDeprecated"/> |
| 1758 | |
Fredrik Roubert | 1ac1579 | 2018-03-26 20:56:58 +0200 | [diff] [blame] | 1759 | <target name="draftAPIs" depends="info, gatherapi" description="Run API collector tool and generate draft API report in html"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1760 | <java classname="com.ibm.icu.dev.tool.docs.CollectAPI" |
| 1761 | classpath="${icu4j.build-tools.jar}" |
| 1762 | failonerror="true"> |
| 1763 | <arg value="-f"/> |
| 1764 | <arg value="Draft"/> |
| 1765 | <arg value="-o"/> |
| 1766 | <arg value="${out.dir}/draftAPIs.html"/> |
| 1767 | <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" /> |
| 1768 | </java> |
| 1769 | </target> |
| 1770 | |
Fredrik Roubert | 1ac1579 | 2018-03-26 20:56:58 +0200 | [diff] [blame] | 1771 | <target name="draftAPIsTSV" depends="info, gatherapi" description="Run API collector tool and generate draft API report in TSV"> |
| 1772 | <java classname="com.ibm.icu.dev.tool.docs.CollectAPI" |
| 1773 | classpath="${icu4j.build-tools.jar}" |
| 1774 | failonerror="true"> |
| 1775 | <arg value="-f"/> |
| 1776 | <arg value="Draft"/> |
| 1777 | <arg value="-o"/> |
| 1778 | <arg value="${out.dir}/draftAPIs.tsv"/> |
| 1779 | <arg value="-t"/> |
| 1780 | <arg value="${out.dir}/icu4j${api.report.version}.api3.gz" /> |
| 1781 | </java> |
| 1782 | </target> |
| 1783 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1784 | <target name="swatDeprecated" depends="build-tools" description="Convert @deprecated @draft tags to @provisional"> |
| 1785 | <antcall target="_runSwatDeprecated"> |
| 1786 | <param name="swat.deprecated.opt" value="-dep"/> |
| 1787 | </antcall> |
| 1788 | </target> |
| 1789 | |
| 1790 | <target name="swatProvisional" depends="build-tools" description="Convert @provisional tags to @deprecated @draft"> |
| 1791 | <antcall target="_runSwatDeprecated"> |
| 1792 | <param name="swat.deprecated.opt" value="-prov"/> |
| 1793 | </antcall> |
| 1794 | </target> |
| 1795 | |
| 1796 | <target name="_runSwatDeprecated"> |
| 1797 | <java classname="com.ibm.icu.dev.tool.docs.SwatDeprecated" |
| 1798 | classpath="${icu4j.build-tools.jar}" |
| 1799 | failonerror="true"> |
| 1800 | <arg value="${swat.deprecated.opt}"/> |
| 1801 | <arg value="-src"/> |
| 1802 | <arg value="${icu4j.core.dir}/src"/> |
| 1803 | <arg value="-dst"/> |
| 1804 | <arg value="${icu4j.core.dir}/src"/> |
| 1805 | <arg value="-overwrite"/> |
| 1806 | <arg value="-verbose"/> |
| 1807 | </java> |
| 1808 | <java classname="com.ibm.icu.dev.tool.docs.SwatDeprecated" |
| 1809 | classpath="${icu4j.build-tools.jar}" |
| 1810 | failonerror="true"> |
| 1811 | <arg value="${swat.deprecated.opt}"/> |
| 1812 | <arg value="-src"/> |
| 1813 | <arg value="${icu4j.charset.dir}/src"/> |
| 1814 | <arg value="-dst"/> |
| 1815 | <arg value="${icu4j.charset.dir}/src"/> |
| 1816 | <arg value="-overwrite"/> |
| 1817 | <arg value="-verbose"/> |
| 1818 | </java> |
| 1819 | </target> |
| 1820 | |
| 1821 | <target name="serialTestData" depends="main, tests"> |
| 1822 | <property name="serial.test.data.dir" value="${out.dir}/serialTestData"/> |
| 1823 | <delete dir="${serial.test.data.dir}"/> |
| 1824 | <mkdir dir="${serial.test.data.dir}"/> |
| 1825 | <java classname="com.ibm.icu.dev.test.serializable.SerializableWriter" fork="yes" failonerror="true"> |
| 1826 | <arg line="${serial.test.data.dir}"/> |
| 1827 | <classpath> |
| 1828 | <pathelement location="${icu4j.core.jar}"/> |
| 1829 | <pathelement location="${icu4j.collate.jar}"/> |
| 1830 | <pathelement location="${icu4j.charset.jar}"/> |
| 1831 | <pathelement location="${icu4j.currdata.jar}"/> |
| 1832 | <pathelement location="${icu4j.langdata.jar}"/> |
| 1833 | <pathelement location="${icu4j.regiondata.jar}"/> |
| 1834 | <pathelement location="${icu4j.translit.jar}"/> |
| 1835 | <pathelement location="${icu4j.test-framework.jar}"/> |
| 1836 | <pathelement location="${icu4j.core-tests.jar}"/> |
| 1837 | </classpath> |
| 1838 | </java> |
| 1839 | <echo message="Note: The serialization compatibility test data files were"/> |
| 1840 | <echo message="created in ${serial.test.data.dir}. Once you confirm"/> |
| 1841 | <echo message="the test runs clean, you should copy the data file directory to"/> |
| 1842 | <echo message="main/tests/core/src/com/ibm/icu/dev/test/serializable/data."/> |
| 1843 | </target> |
| 1844 | |
| 1845 | <!-- Special packaging targets --> |
| 1846 | <target name="translitIMEJar" depends="info" description="Build transliterator IME 'icutransime.jar' jar file"> |
| 1847 | <property name="translit.ime.out.dir" value="${out.dir}/translit_ime"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1848 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1849 | <mkdir dir="${translit.ime.out.dir}/bin"/> |
| 1850 | <javac destdir="${translit.ime.out.dir}/bin" |
| 1851 | source="${javac.source}" |
| 1852 | target="${javac.target}" |
| 1853 | encoding="${java.src.encoding}" |
| 1854 | debug="on" deprecation="off"> |
| 1855 | <src path="${icu4j.core.dir}/src"/> |
| 1856 | <src path="${icu4j.translit.dir}/src"/> |
| 1857 | <src path="${icu4j.tools.dir}/src"/> |
| 1858 | <include name="com/ibm/icu/dev/tool/ime/translit/*.java"/> |
| 1859 | </javac> |
| 1860 | |
| 1861 | <copy file="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/translit/Transliterator.properties" |
| 1862 | todir="${translit.ime.out.dir}/bin/com/ibm/icu/dev/tool/ime/translit"/> |
| 1863 | |
| 1864 | <mkdir dir="${translit.ime.out.dir}/lib"/> |
| 1865 | <jar jarfile="${translit.ime.out.dir}/lib/icutransime.jar" |
| 1866 | compress="true" |
| 1867 | basedir="${translit.ime.out.dir}/bin" |
| 1868 | includes="com/ibm/icu/dev/tool/ime/translit/**/*" |
| 1869 | manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/translit/manifest.stub"> |
| 1870 | <metainf dir="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/translit" includes="services/*" /> |
| 1871 | </jar> |
| 1872 | </target> |
| 1873 | |
| 1874 | <target name="indicIMEJar" depends="info" description="Build indic IME 'icuindicime.jar' jar file"> |
| 1875 | <property name="indic.ime.out.dir" value="${out.dir}/indic_ime"/> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 1876 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1877 | <mkdir dir="${indic.ime.out.dir}/bin"/> |
| 1878 | <javac destdir="${indic.ime.out.dir}/bin" |
| 1879 | source="${javac.source}" |
| 1880 | target="${javac.target}" |
| 1881 | encoding="${java.src.encoding}" |
| 1882 | debug="on" deprecation="off"> |
| 1883 | <src path="${icu4j.core.dir}/src"/> |
| 1884 | <src path="${icu4j.tools.dir}/src"/> |
| 1885 | <include name="com/ibm/icu/dev/tool/ime/indic/*.java"/> |
| 1886 | </javac> |
| 1887 | |
| 1888 | <copy file="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/indic/DisplayNames.properties" |
| 1889 | todir="${indic.ime.out.dir}/bin/com/ibm/icu/dev/tool/ime/indic"/> |
| 1890 | |
| 1891 | <mkdir dir="${indic.ime.out.dir}/lib"/> |
| 1892 | <jar jarfile="${indic.ime.out.dir}/lib/icuindicime.jar" |
| 1893 | compress="true" |
| 1894 | basedir="${indic.ime.out.dir}/bin" |
| 1895 | includes="com/ibm/icu/dev/tool/ime/indic/**/*" |
| 1896 | manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/indic/manifest.stub"> |
| 1897 | <metainf dir="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/ime/indic" includes="services/*" /> |
| 1898 | </jar> |
| 1899 | </target> |
| 1900 | |
| 1901 | <target name="cldrUtil" depends="icu4jJar" description="Build Utilities for CLDR tooling"> |
| 1902 | <mkdir dir="${cldr.util.out.dir}/bin"/> |
| 1903 | <javac destdir="${cldr.util.out.dir}/bin" |
| 1904 | source="${javac.source}" |
| 1905 | target="${javac.target}" |
| 1906 | encoding="${java.src.encoding}" |
| 1907 | debug="on" deprecation="off" |
| 1908 | classpath="${icu4j.jar.file}"> |
| 1909 | |
| 1910 | <src path="${icu4j.tools.dir}/src"/> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1911 | <src path="${icu4j.test-framework.dir}/src"/> |
| 1912 | |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 1913 | <include name="com/ibm/icu/dev/util/CollectionUtilities.java" /> |
| 1914 | <include name="com/ibm/icu/dev/util/ElapsedTimer.java" /> |
| 1915 | <include name="com/ibm/icu/dev/util/UnicodeMap.java" /> |
| 1916 | <include name="com/ibm/icu/dev/util/UnicodeMapIterator.java" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1917 | <include name="com/ibm/icu/dev/tool/UOption.java" /> |
| 1918 | </javac> |
| 1919 | |
| 1920 | <mkdir dir="${cldr.util.out.dir}/lib"/> |
| 1921 | <jar jarfile="${cldr.util.out.dir}/lib/utilities.jar" |
| 1922 | compress="true" |
| 1923 | basedir="${cldr.util.out.dir}/bin"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1924 | <include name="com/ibm/icu/dev/util/*.class"/> |
| 1925 | <include name="com/ibm/icu/dev/tool/UOption*.class"/> |
| 1926 | </jar> |
| 1927 | </target> |
| 1928 | |
| 1929 | <target name="releaseCLDR" depends="icu4jJar,icu4jSrcJar,cldrUtil" description="Build release files for CLDR tooling"> |
| 1930 | <mkdir dir="${cldr.release.dir}"/> |
| 1931 | <!-- icu4j.jar --> |
| 1932 | <copy file="${icu4j.jar.file}" todir="${cldr.release.dir}"/> |
| 1933 | <!-- icu4j-src.jar --> |
| 1934 | <copy file="${icu4j-src.jar.file}" todir="${cldr.release.dir}"/> |
| 1935 | <!-- utilities.jar --> |
| 1936 | <copy file="${cldr.util.out.dir}/lib/utilities.jar" todir="${cldr.release.dir}"/> |
| 1937 | <!-- utilities-src.jar --> |
| 1938 | <jar jarfile="${cldr.release.dir}/utilities-src.jar" compress="true"> |
| 1939 | <fileset dir="${icu4j.test-framework.dir}/${src.dir}"> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 1940 | <include name="com/ibm/icu/dev/util/CollectionUtilities.java" /> |
| 1941 | <include name="com/ibm/icu/dev/util/ElapsedTimer.java" /> |
| 1942 | <include name="com/ibm/icu/dev/util/UnicodeMap.java" /> |
| 1943 | <include name="com/ibm/icu/dev/util/UnicodeMapIterator.java" /> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1944 | </fileset> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1945 | <fileset dir="${icu4j.tools.dir}/${src.dir}" includes="com/ibm/icu/dev/tool/UOption.java"/> |
| 1946 | </jar> |
| 1947 | </target> |
| 1948 | |
| 1949 | <target name="xliff" description="Build xliff converter tool"> |
| 1950 | <property name="xliff.out.dir" value="${out.dir}/xliff"/> |
| 1951 | |
| 1952 | <mkdir dir="${xliff.out.dir}/bin"/> |
| 1953 | <javac destdir="${xliff.out.dir}/bin" |
| 1954 | source="1.3" |
| 1955 | target="1.3" |
| 1956 | encoding="${java.src.encoding}" |
| 1957 | debug="on" deprecation="off"> |
| 1958 | <src path="${icu4j.tools.dir}/src"/> |
| 1959 | <include name="com/ibm/icu/dev/tool/localeconverter/CalculateCRC32.java"/> |
| 1960 | <include name="com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java"/> |
| 1961 | <include name="com/ibm/icu/dev/tool/UOption.java"/> |
| 1962 | </javac> |
| 1963 | |
| 1964 | <mkdir dir="${xliff.out.dir}/lib"/> |
| 1965 | |
| 1966 | <jar jarfile="${xliff.out.dir}/lib/xliff-src.jar" |
| 1967 | compress="true" |
| 1968 | basedir="${icu4j.tools.dir}/src"> |
| 1969 | <include name="com/ibm/icu/dev/tool/localeconverter/CalculateCRC32.java"/> |
| 1970 | <include name="com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java"/> |
| 1971 | <include name="com/ibm/icu/dev/tool/UOption.java"/> |
| 1972 | </jar> |
| 1973 | |
| 1974 | <jar jarfile="${xliff.out.dir}/lib/xliff.jar" |
| 1975 | compress="true" |
| 1976 | basedir="${xliff.out.dir}/bin" |
| 1977 | manifest="${icu4j.tools.dir}/src/com/ibm/icu/dev/tool/localeconverter/manifest.stub"/> |
| 1978 | </target> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 1979 | </project> |