Home | History | Annotate | Download | only in core
      1 <!--
      2 *  2016 and later: Unicode, Inc. and others.
      3 * License & terms of use: http://www.unicode.org/copyright.html#License
      4 *******************************************************************************
      5 * Copyright (C) 2009-2015, International Business Machines Corporation and
      6 * others. All Rights Reserved.
      7 *******************************************************************************
      8 -->
      9 <project name="core" default="build" basedir=".">
     10     <property file="build-local.properties"/>
     11     <property file="build.properties"/>
     12     <import file="${shared.dir}/build/common-targets.xml"/>
     13 
     14     <path id="javac.classpathref">
     15         <path refid="javac.classpathref.${ant.project.name}"/>
     16     </path>
     17     <property name="jar.name" value="icu4j-${ant.project.name}.jar"/>
     18     <property name="src.jar.name" value="icu4j-${ant.project.name}-src.jar"/>
     19 
     20     <target name="build" depends="compile, copy, jar, src-jar" description="Build the project"/>
     21 
     22     <target name="build-all" depends="@build-all" description="Build the project including all dependencies"/>
     23 
     24     <target name="clean" depends="@clean" description="Clean up the build outputs"/>
     25 
     26     <target name="compile" depends="@compile" description="Compile java source files"/>
     27 
     28     <target name="copy" depends="@copy, copy-data" description="Copy non-java runtime files to the project's binary directory"/>
     29 
     30     <target name="jar" depends="compile, copy, @jar" description="Create the project's jar file"/>
     31 
     32     <target name="src-jar" depends="@src-jar" description="Create the project's source jar file"/>
     33 
     34     <target name="findbugs" depends="@findbugs" description="Search the project for possible defects using FindBugs." />
     35 
     36     <target name="copy-data" depends="set-icuconfig-datapath" unless="icu4c.data.path" description="Extract pre-built ICU core data files and copy them to the project's binary directory">
     37         <unjar src="${icu4j.data.jar}" dest="${bin.dir}">
     38             <patternset>
     39                 <exclude name="META-INF"/>
     40                 <exclude name="META-INF/**/*"/>
     41                 <exclude name="${icu4j.data.path}/coll/**"/>
     42                 <exclude name="${icu4j.data.path}/curr/**"/>
     43                 <exclude name="${icu4j.data.path}/lang/**"/>
     44                 <exclude name="${icu4j.data.path}/region/**"/>
     45                 <exclude name="${icu4j.data.path}/translit/**"/>
     46                 <exclude name="**/*.cnv"/>
     47                 <exclude name="**/cnvalias.icu"/>
     48             </patternset>
     49         </unjar>
     50         <unjar src="${icu4j.tzdata.jar}" dest="${bin.dir}">
     51             <patternset>
     52                 <exclude name="META-INF"/>
     53                 <exclude name="META-INF/**/*"/>
     54             </patternset>
     55         </unjar>
     56 
     57         <antcall target="@full-locale-names">
     58             <param name="res.dir" value="${bin.dir}/${icu4j.data.path}"/>
     59         </antcall>
     60 
     61         <antcall target="@full-locale-names">
     62             <param name="res.dir" value="${bin.dir}/${icu4j.data.path}/brkitr"/>
     63         </antcall>
     64 
     65         <antcall target="@full-locale-names">
     66             <param name="res.dir" value="${bin.dir}/${icu4j.data.path}/rbnf"/>
     67         </antcall>
     68 
     69         <antcall target="@full-locale-names">
     70             <param name="res.dir" value="${bin.dir}/${icu4j.data.path}/zone"/>
     71         </antcall>
     72     </target>
     73 
     74     <target name="set-icuconfig-datapath" if="icu4c.data.path">
     75         <propertyfile
     76                 file="${bin.dir}/com/ibm/icu/ICUConfig.properties"
     77                 comment="ICU runtime configuration generated by Ant">
     78             <entry key="com.ibm.icu.impl.ICUBinary.dataPath" value="${icu4c.data.path}"/>
     79         </propertyfile>
     80     </target>
     81 </project>
     82