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