Skip to content

Commit 2fa8a09

Browse files
committed
ICU-22773 Migrate the CLDR conversion tool to Maven
1 parent 3b9c0fc commit 2fa8a09

32 files changed

+1346
-1113
lines changed

.github/adaboost.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// © 2022 and later: Unicode, Inc. and others.
22
// License & terms of use: http://www.unicode.org/copyright.html
3-
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
3+
// Generated using tools/cldr/cldr-to-icu/
44
//
55
// Include Japanese adaboost model.
66
{

.github/lstm_for_th_my.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// © 2021 and later: Unicode, Inc. and others.
22
// License & terms of use: http://www.unicode.org/copyright.html
3-
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
3+
// Generated using tools/cldr/cldr-to-icu/
44
//
55
// Include Burmese and Thai lstm models.
66
{

docs/processes/cldr-icu.md

Lines changed: 114 additions & 102 deletions
Large diffs are not rendered by default.

docs/processes/release/tasks/versions.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ need to be correspondingly updated. See below for more files to be updated and s
5353
[icu4c/source/data/misc/icuver.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/misc/icuver.txt)
5454
needs to be updated with the correct version number for ICU and its data.
5555

56+
#### Since ICU 77
57+
58+
The tool takes the `icuVersion` and `icuDataVersion` from the official ICU APIs.
59+
(from the icu4j listed as a dependency of the tool, usually the one you just built from the `icu4j` folder).
60+
61+
If you need values different than that, you can specify them as the command line parameters (`--icuVersion` and `--icuDataVersion`).
62+
5663
#### Since ICU 68
5764

5865
In
@@ -212,8 +219,18 @@ The command requires a version number string that follows the typical Java / Mav
212219
213220
6. cldr-to-icu build tool has a dependency on the icu4j packages which needs to be updated in [`tools/cldr/cldr-to-icu/pom.xml`](https://github.com/unicode-org/icu/blob/main/tools/cldr/cldr-to-icu/pom.xml). Please update it to match the version that was updated in `icu4j/pom.xml` in the steps above.
214221
215-
`<version>74.0.1-SNAPSHOT</version>`
222+
```xml
223+
version>74.0.1-SNAPSHOT</version>
224+
```
216225

226+
Since ICU 77 this moved to a property:
227+
```xml
228+
<icu4j.version>77.0.1-SNAPSHOT</icu4j.version>
229+
```
230+
Which can be easily be set from command line:
231+
```sh
232+
mvn versions:set-property -Dproperty=icu4j.version -DnewVersion=77.1 -f $ICU_DIR/tools/cldr/cldr-to-icu
233+
```
217234

218235
#### Until ICU 73 (inclusive)
219236

icu4c/source/data/unidata/changes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ copying that version number into the $ICU_SRC/.bazeliskrc config file.
290290
- run Unicode Tools GenerateUnihanCollators & GenerateUnihanCollatorFiles,
291291
check CLDR diffs, copy to CLDR, test CLDR, ... as documented there
292292
- generate ICU zh collation data
293+
WARNING: outdated, don't do this, follow the tools/cldr/cldr-to-icu/README.md file!
294+
--- Old text from here:
293295
instructions inspired by
294296
https://github.com/unicode-org/icu/blob/main/tools/cldr/cldr-to-icu/README.txt and
295297
https://github.com/unicode-org/icu/blob/main/icu4c/source/data/cldr-icu-readme.txt

tools/cldr/.gitignore

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# Exclude the Maven local repository but keep the lib directory and the top-level readme, scripts and build config.
2-
/lib/**
3-
!/lib/README.txt
4-
!/lib/install-cldr-jars.sh
5-
!/lib/pom.xml
6-
7-
# Ignore the default Maven target directory.
8-
/cldr-to-icu/target
9-
1+
# Eclipse IDE generated files
2+
.classpath
3+
.project
4+
.settings/

tools/cldr/build.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<!-- This build file is intended to become the single mechanism for working with CLDR
55
code and data when building ICU data.
6-
6+
77
Eventually it will encompass:
88
* Building ICU data form CLDR data via cldr-to-icu.
99
* Building the CLDR libraries needed to support ICU data conversion.
@@ -70,23 +70,4 @@
7070
<delete dir="${testDataDir4J}"/>
7171
</target>
7272

73-
<!-- Builds the ICU data, using the Ant build file in the cldr-to-icu directory and passing.
74-
through any specified arguments for controlling the build. If you need more control when
75-
building ICU data (such as incrementally building parts of the data), you should use the
76-
build-icu-data.xml file directly. -->
77-
<target name="build-icu-data">
78-
<ant dir="cldr-to-icu" antfile="build-icu-data.xml" target="all" inheritAll="true"/>
79-
</target>
80-
81-
<!-- Deletes generated ICU data by invoking "clean" in cldr-to-icu/build-icu-data.xml -->
82-
<target name="clean-icu-data">
83-
<ant dir="cldr-to-icu" antfile="build-icu-data.xml" target="clean" inheritAll="true"/>
84-
</target>
85-
86-
<!-- Installs the CLDR library dependencies needed for building ICU data. -->
87-
<target name="install-cldr-libs" depends="init-args">
88-
<exec dir="lib" executable="install-cldr-jars.sh" resolveexecutable="true" failonerror="true">
89-
<arg line="${cldrDir}"/>
90-
</exec>
91-
</target>
9273
</project>

tools/cldr/cldr-to-icu/.classpath

Lines changed: 0 additions & 31 deletions
This file was deleted.

tools/cldr/cldr-to-icu/.project

Lines changed: 0 additions & 23 deletions
This file was deleted.

tools/cldr/cldr-to-icu/.settings/org.eclipse.jdt.core.prefs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)