How do I build the Android version from source?

I've migrated over to using Lagrange on both my desktop and my mobile running Android 13 - previously I was using Kristall on the desktop and Deedum on mobile, but Lagrange is just such a delight to use that I've decided to use it for both.

There's one issue, though - I'd like to build the Android version from source (like I built the desktop version) rather than relying on adding an F-Droid repo, and I don't know how to do that (and there don't seem to be any instructions for doing so). The CMakeLists.txt file mentions Gradle next to the ANDROID_BUILD_VERSION variable, but I don't see any build.gradle files or similar.

Is this functionality just not released yet?

#Android

Posted in: s/Lagrange

๐ŸฆŠ Sophira

2025-05-03 ยท 1 year ago

1 Comment

๐ŸŒ† skyjake [mod...] ยท 2025-05-04 at 02:58:

The Lagrange Android app is a separate project and the source is available here:

โ€” https://git.skyjake.fi/gemini/lagrange-android.git

The real tricky step is compiling the 3rd party dependencies for the needed CPU architectures using the NDK. Lagrange's "/cmake/Depends-Android.cmake" is responsible for finding the library binaries during the build. (Also note there is "/lib/the_Foundation/Depends.cmake".) At the moment, these are assumed to be in the manually-configured ${ANDROID_DIR}:

As you can see in the Depends.cmake, each of these is assumed to have their own subdirectory for the binaries and headers (named as above).