Skip to content

Use Android's built-in ICU in place of ICU4J - #139

Merged
ethindp merged 1 commit into
ethindp:masterfrom
trypsynth:android-platform-icu
Sep 23, 2026
Merged

ethindp merged 1 commit into
ethindp:masterfrom
trypsynth:android-platform-icu

Conversation

@trypsynth

Copy link
Copy Markdown
Contributor

TextChunker uses ICU4J only for BreakIterator and ULocale. Android has shipped both as android.icu.text.BreakIterator and android.icu.util.ULocale since API 24, and prism's minSdk is 26. Each app that uses prism currently bundles the ICU4J jar, which is about 15 MB, just for those two classes.

What this does

It switches the two imports to android.icu and drops the com.ibm.icu:icu4j dependency from build.gradle. The API is the same, so nothing else changes.

Testing

I built the AAR with ./gradlew assembleRelease on Ubuntu, then used it from a .NET Android app on an API 34 x86_64 emulator. prism_registry_create_best picked Android Text to Speech, and prism_backend_speak spoke a sentence. That path goes through TextChunker.split.

@ethindp
ethindp merged commit 1b3c4b8 into ethindp:master Sep 23, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants