• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2* © 2016 and later: Unicode, Inc. and others.
3* License & terms of use: http://www.unicode.org/copyright.html
4*******************************************************************************
5* Copyright (C) 2009-2015, International Business Machines Corporation and    *
6* others. All Rights Reserved.                                                *
7*******************************************************************************
8-->
9<project name="build-tools" default="build" basedir=".">
10    <property file="build-local.properties"/>
11    <property file="build.properties"/>
12
13    <!-- before importing common-targets.xml -->
14    <condition property="alt.src.dir" value="out/tmp-src-pre8">
15        <or>
16            <equals arg1="${ant.java.version}" arg2="1.7"/>
17        </or>
18    </condition>
19
20    <condition property="src.dir" value="${alt.src.dir}">
21        <isset property="alt.src.dir"/>
22    </condition>
23
24    <import file="${shared.dir}/build/common-targets.xml"/>
25
26    <path id="javac.classpathref">
27        <path refid="javac.classpathref.${ant.project.name}"/>
28    </path>
29    <property name="jar.name" value="icu4j-${ant.project.name}.jar"/>
30    <property name="src.jar.name" value="icu4j-${ant.project.name}-src.jar"/>
31
32    <target name="build" depends="compile, copy, jar" description="Build the project"/>
33
34    <target name="build-all" depends="@build-all" description="Build the project including all dependencies"/>
35
36    <target name="clean" depends="@clean" description="Clean up the build outputs"/>
37
38    <target name="compile" depends="copy-src-pre8, @compile" description="Compile java source files"/>
39
40    <target name="copy" depends="@copy" description="Copy non-java runtime files to the project's binary directory"/>
41
42    <target name="jar" depends="compile, copy, @jar" description="Create the project's jar file"/>
43
44    <target name="src-jar" depends="copy-src-pre8, @src-jar" description="Create the project's source jar file"/>
45
46    <!-- Override a source file for supporting JDK 8 JavaDoc -->
47    <target name="copy-src-pre8" if="alt.src.dir">
48        <echo message="Building ICU4J build tools with JDK7 or older tools..."/>
49        <mkdir dir="${alt.src.dir}"/>
50        <!-- copy all files under 'src' -->
51        <copy todir="${alt.src.dir}">
52            <fileset dir="src"/>
53        </copy>
54        <!-- overwrite jdk7 or older specific source file -->
55        <copy todir="${alt.src.dir}" overwrite="yes">
56            <fileset dir="src-pre8"/>
57        </copy>
58    </target>
59</project>
60