Neil Fuller | 3a353ce | 2015-10-09 13:30:08 +0100 | [diff] [blame] | 1 | This directory contains tools for ICU updates. |
| 2 | |
| 3 | Data update tools |
| 4 | ================= |
Neil Fuller | 994dcd1 | 2015-08-25 10:37:14 +0100 | [diff] [blame] | 5 | |
| 6 | update-tzdata.py |
| 7 | - downloads tzdata updates and regenerates the ICU and |
| 8 | libcore/bionic timezone data files. |
| 9 | There are sometimes code and metadata changes associated |
| 10 | with tzdata updates that should be applied at the same time. |
| 11 | e.g. see http://bugs.icu-project.org/trac/search?q=2015d |
| 12 | |
| 13 | ICU and CTS tests for bionic / libcore should be run before |
| 14 | and after. |
| 15 | |
| 16 | updateicudata.py |
| 17 | - regerates the ICU data files. |
| 18 | ICU and CTS tests for libcore should be run before and |
| 19 | after. |
Neil Fuller | 3a353ce | 2015-10-09 13:30:08 +0100 | [diff] [blame] | 20 | |
Neil Fuller | ca55127 | 2015-12-04 13:04:01 +0000 | [diff] [blame] | 21 | Source code updates |
| 22 | =================== |
Neil Fuller | 3a353ce | 2015-10-09 13:30:08 +0100 | [diff] [blame] | 23 | |
Neil Fuller | ca55127 | 2015-12-04 13:04:01 +0000 | [diff] [blame] | 24 | The source code in android_icu4j is generated from the code in icu4j. Do not change the code |
| 25 | in android_icu4j directly: instead you change the icu4j source or the rules used to generate |
| 26 | android_icu4j. |
| 27 | |
| 28 | All changes made to icu4j should be accompanied by changes in android_icu4j and vice versa. |
| 29 | |
| 30 | Applying patches to ICU4J |
| 31 | ------------------------- |
| 32 | |
| 33 | After making changes to icu4j (e.g. after applying upstream patches): |
| 34 | |
| 35 | source build/envsetup.sh |
| 36 | lunch |
| 37 | |
| 38 | cd external/icu/tools/srcgen |
| 39 | ./generate_android_icu4j.sh |
| 40 | |
| 41 | The code in android_icu4j will be regenerated and should contain the changes you made |
| 42 | in icu4j. Confirm the diffs are what you intended. Commit both at the same time. |
| 43 | |
| 44 | Modifying the code gen |
| 45 | ---------------------- |
| 46 | |
| 47 | android_icu4j is generated using a Java tool found in tools/srcgen. |
| 48 | |
| 49 | The "rules" that transform the source are configured in |
| 50 | src/main/java/com/android/icu4j/srcgen/Icu4jTransform.java. |
| 51 | |