KDE on Android: Cross-Compiling Docker Image

This is a short heads-up about our new Docker image for Android cross compiling. The Dockerfile can be found in the following repository:

https://phabricator.kde.org/diffusion/ANDROIDBUILDER/

For people never worked with Docker, I probably have to add slightly more information: Frankly, the Dockerfile is a recipe how Docker generates a system image that can be run as a virtual machine (for details, please use your favorite search machine). The virtual machine built by our Docker script provides a pre-configured cross-building environment for Qt applications on Android. Especially, our setup is very well suited to compile CMake-based Android projects, which use the cross-building toolchain from Extra-CMake-Modules. Using only 3 commands (see documentation at community.kde.org/Android), the virtual machine gets set up and one can directly start working.

At last, let me try to answer the question about why we are creating Docker images, which I actually got from various people. For me, there are at least three different answers:

  • Especially for starters it is not that simple to get their first cross-compiling infrastructure working (yeah, it is quit simple if you know what you have to do).
  • If we are looking ahead into the future, we will need a proper CI for Android builds and having a Docker image that can used for this is an important step.
  • For binary releases I would like to have a clean system and not generate the binaries on someones messy system that is patched together by numerous workarounds.

PS: many thanks to Ovidiu, who worked the last days on making this script use all the cool Docker functionality!

PPS: there is a new mailing list kde-android@kde.org for people interested in KDE on Android

Leave a comment