Android application built on top of F3D.
- Docker (for building native libraries)
- Android SDK
- Java 17
The update_native_libs.sh script clones F3D, cross-compiles it for Android inside Docker containers, and copies the resulting .so and .jar files into the project.
Unless a specific F3D version is needed, this step can be skipped.
# Build for all architectures (arm64-v8a, armeabi-v7a, x86_64, x86)
./update_native_libs.sh
# Build a specific release
./update_native_libs.sh --branch v3.4.1
# Build only specific architectures
./update_native_libs.sh --arch arm64-v8a --arch x86_64
# Use a custom fork or branch
./update_native_libs.sh --repo Meakk/f3d --branch my-feature
# Use an existing local clone
./update_native_libs.sh --clone-dir ~/dev/f3d-srcRun ./update_native_libs.sh --help for the full list of options.
It's recommended to use Java 17 because the build can break with untested recent Java versions. If several Java versions are installed, one can set the following variable:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdkUse the Gradle wrapper to build:
# Debug build
./gradlew assembleDebug
# Release build
./gradlew assembleReleaseNote
In order to build the release package, the signing file should be copied to f3d/f3d-android-key.jks and the environment variable ANDROID_KEYSTORE_PASSWORD should contain the correct password.
The resulting APK files are located in f3d/build/outputs/apk/.