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