Skip to content

Add Android ICU4C cross-compile packaging and CI - #26

Open
hahn-kev-bot wants to merge 10 commits into
sillsdev:fwfrom
hahn-kev-bot:feature/android-icu-build
Open

Add Android ICU4C cross-compile packaging and CI#26
hahn-kev-bot wants to merge 10 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.

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