Since the last F-Droid release of my app FlorisBoard I’ve added an external dependency to my app, namely ICU (or ICU4C to be more precise). As there’s not really a standard way to include ICU for native C++ on Android, I’ve set up a custom build script to cross-compile ICU for all targeted ABIs. The cross-compile process is time consuming though, so I’ve then added the prebuilt output from my local machine to the build repository and re-use the library files. This works perfectly fine for releases on GitHub or on Google Play, but for F-Droid I cannot use these prebuilt files, as they would count as binary blobs. The ICU source code + build script and the prebuilt ICU library files are stored in this repository: https://github.com/florisboard/icu4c and are included as a git submodule in the main app repository.
The question now is, is there a way for F-Droid to build the ICU library once from source and then re-use it? The compiled ICU files will rarely change, only when I either have to change the data configuration or if I upgrade the ICU version, so it would make sense to use the library files for multiple app builds. I’ve done some research before asking and the only thing I found was the
srclibs field in the recipe, but I couldn’t really find more info how these work and if they also work for NDK-related libraries.
Thanks in advance for the help!