/
githubmirror
/
icu
Обзор
Документация
Войти
/
githubmirror
/
icu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/currency/build.xml
82 строки
3 KB
Yoshito Umaoka
ICU-23056 BRS78 Update currency numeric codes
14 сен 2025, 07:13
14 сен 2025, 07:13
e1a4ee7
Код
Авторство
О чём код?
<!-- * © 2016 and later: Unicode, Inc. and others. * License & terms of use: http://www.unicode.org/copyright.html ******************************************************************************* * Copyright (C) 2012-2013, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* --> <project name="currency-numeric" default="build" basedir="."> <property name="out.dir" value="${basedir}/out"/> <property name="src.dir" value="${basedir}/src"/> <property name="classes.dir" value="${out.dir}/bin"/> <property name="res.dir" value="${out.dir}/res"/> <property name="xml.dir" value="${out.dir}/xml"/> <property name="base.url" value="https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/"/> <property name="current.xml" value="list-one.xml"/> <property name="historic.xml" value="list-three.xml"/> <target name="build" depends="check, resource" description="Verify ICU's local data and generate ISO 4217 alpha-numeric code mapping data resource"/> <target name="classes" description="Build the Java tool"> <mkdir dir="${classes.dir}"/> <javac srcdir="${src.dir}" destdir="${classes.dir}" source="11" target="11" encoding="UTF-8" includeAntRuntime="false"/> </target> <target name="_checkLocalXml"> <condition property="isLocalXml"> <and> <available file="${basedir}/${current.xml}"/> <available file="${basedir}/${historic.xml}"/> </and> </condition> </target> <target name="_localXml" depends="_checkLocalXml" if="isLocalXml"> <echo message="Using local ISO 4217 XML data files"/> <copy file="${current.xml}" todir="${xml.dir}"/> <copy file="${historic.xml}" todir="${xml.dir}"/> </target> <target name="_downloadXml" unless="isLocalXml"> <echo message="Downloading ISO 4217 XML data files"/> <mkdir dir="${xml.dir}"/> <get src="${base.url}${current.xml}" dest="${xml.dir}"> <header name="Accept" value="application/xml"/> </get> <get src="${base.url}${historic.xml}" dest="${xml.dir}"> <header name="Accept" value="application/xml"/> </get> </target> <target name="xmlData" depends="_localXml, _downloadXml" description="Prepare necessary ISO 4217 XML data files"> </target> <target name="check" depends="classes, xmlData" description="Verify if ICU's local mapping data is synchronized with the XML data"> <java classname="com.ibm.icu.dev.tool.currency.Main" classpath="${classes.dir}" failonerror="true"> <arg value="check"/> <arg value="${xml.dir}/${current.xml}"/> <arg value="${xml.dir}/${historic.xml}"/> </java> </target> <target name="resource" depends="classes" description="Build ISO 4217 alpha-numeric code mapping data resource"> <mkdir dir="${res.dir}"/> <java classname="com.ibm.icu.dev.tool.currency.Main" classpath="${classes.dir}" failonerror="true"> <arg value="build"/> <arg value="${res.dir}"/> </java> <echo message="ISO 4217 numeric code mapping data was successfully created in ${res.dir}"/> </target> <target name="clean" description="Delete build outputs"> <delete dir="${out.dir}"/> </target> </project>