Skip to content

Add Android ICU4C, NuGet packaging, and CI pipeline - #26

Merged
hahn-kev merged 13 commits into
sillsdev:fwfrom
hahn-kev-bot:feature/android-icu-build
Aug 13, 2026
Merged

Add Android ICU4C, NuGet packaging, and CI pipeline#26
hahn-kev merged 13 commits into
sillsdev:fwfrom
hahn-kev-bot:feature/android-icu-build

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Aug 3, 2026

Copy link
Copy Markdown

Building ICU for Android so we can use it in icu-dotnet. Supports x86_64, arm64-v8a, and armeabi-v7a.


AI summary

Summary

  • Adds build-android.sh / build-android.ps1 to cross-compile this checkout's SIL-modified ICU4C for Android (x86_64, arm64-v8a) with NDK tooling and APK-ready .so / .dat layout.
  • Documents the Android build prerequisites, controls, and consumer integration contract in icu4c/packaging/README.android.md (linked from the top-level README).
  • Adds an android-build job to FW Branch CI that installs NDK 27, builds both ABIs, and verifies the expected output files.

Test plan

  • Confirm android-build is green on this PR
  • Spot-check CI logs for host ICU build + both ABI cross-compiles
  • Optionally run bash icu4c/packaging/build-android.sh --arch=x86_64 locally with a Linux NDK

Made with Cursor


This change is Reviewable

hahn-kev and others added 5 commits August 3, 2026 14:27
Enables building SIL-modified ICU for Android ABIs and verifies the APK-ready output contract in FW Branch CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bash unsets every name in a multi-assignment local before applying values, so referencing major in the same statement failed after the host build.

Co-authored-by: Cursor <cursoragent@cursor.com>
Only packaging and ICU source are needed for the cross-compile, so skip full history and unrelated trees.

Co-authored-by: Cursor <cursoragent@cursor.com>
Packs Android ICU natives and data for MAUI consumers, uploads the nupkg on CI, and publishes to nuget.org on fw pushes.

Co-authored-by: Cursor <cursoragent@cursor.com>
GitHub rejects upload-artifact@v2 and cache@v2; also refresh checkout, setup-msbuild, and GITHUB_OUTPUT.

Co-authored-by: Cursor <cursoragent@cursor.com>
hahn-kev and others added 5 commits August 7, 2026 13:58
Resolve debian-packaging conflict by keeping noble packaging Install prerequisites from fw alongside Android CI updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ship archive-packaged stub libicudata with icudt*.dat, link unversioned SONAMEs for APK loading, and correct the PowerShell multi-ABI wrapper plus host/CI cache behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Without %(RecursiveDir) MSBuild flattens ABI folders into build/, so consumer Exists() checks skip all natives and data; verify the nupkg contents after pack.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI showed build/%(RecursiveDir) still omitted build/assets; emit concrete PackagePath entries for props, assets, and each ABI instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI and packaging now include 32-bit ARM alongside x86_64 and arm64-v8a so apps can run on older ARM devices.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hahn-kev
hahn-kev marked this pull request as ready for review August 11, 2026 10:01
@hahn-kev
hahn-kev requested a review from ermshiperete August 11, 2026 10:01
@hahn-kev

Copy link
Copy Markdown

@ermshiperete I think this is ready to go. In order to test it I downloaded the nupkg and used it in my tests in sillsdev/icu-dotnet#230, so I'm fairly confident that this is working correctly. As you can see AI wrote all the code for the build scripts, I've glanced over it but I don't really write shell scripts myself. If you have any feedback I'm happy to pass that back to an AI to fix it. Let me know what you think.

Comment thread icu4c/nugetpackage/assets/android/build/Icu4c.Android.Fw.Lib.targets Outdated
Comment thread icu4c/packaging/build-android.ps1 Outdated
Comment thread icu4c/packaging/build-android.sh Outdated
Comment thread icu4c/packaging/build-android.sh Outdated
Comment thread icu4c/packaging/pack-android-nuget.sh Outdated
- Remove unused build-android.ps1; run build-android.sh from Git Bash on
  Windows instead, and update README.android.md accordingly.
- Rename ABIS/--abis to ARCHS/--arch in pack-android-nuget.sh to match
  build-android.sh.
- Use realpath for SCRIPT_DIR/ICU4C_DIR in build-android.sh.
- Drop confusing comment from Icu4c.Android.Fw.Lib.targets and reword the
  SONAME-override comment in build-android.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hahn-kev

Copy link
Copy Markdown

Updated from your feedback thanks!

hahn-kev and others added 2 commits August 13, 2026 09:52
- Add a NuGet packages table to README.md with version badges for the fw
  packages (Icu4c.Win.Fw.Lib, Icu4c.Win.Fw.Bin, Icu4c.Android.Fw.Lib).
- Rename the NuGet publish secret to SILLSDEV_PUBLISH_NUGET_ORG in
  fw_icu4c_ci.yml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When the host or per-ABI build tree is restored from the CI cache, git
checkout rewrites configure/uvernum.h mtimes to now, so ICU's Makefile
treats the cached config.status as stale and aborts. Refresh config.status
mtime on the incremental (reuse) path so the build proceeds against the
existing, identical configuration (the cache key already pins configure and
uvernum.h, so reuse only happens when they are byte-identical).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hahn-kev hahn-kev changed the title Add Android ICU4C cross-compile packaging and CI Add Android ICU4C, NuGet packaging, and CI pipeline Aug 13, 2026
@hahn-kev
hahn-kev merged commit c7f84b5 into sillsdev:fw Aug 13, 2026
5 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.

3 participants