-
-
Save roman-yagodin/5f39956987c9982ba0b1671d1ab431a1 to your computer and use it in GitHub Desktop.
Compile Godot for Android easily
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
# This script compiles Android debug and release templates from a Godot Git clone. | |
# It needs to be run from a GNU/Linux system. The compilation process will automatically | |
# use all CPU threads available. | |
# You will need to install Android SDK (API 19) and NDK (latest, as of May 2016). | |
# Place this script at the root of your Godot Git clone. | |
# CC0 1.0 Universal | |
# Change those to the path of Android SDK and NDK | |
export ANDROID_HOME="/opt/android-sdk" | |
export ANDROID_NDK_ROOT="/opt/android-ndk" | |
# Build Godot for Android in debug and release mode | |
scons p=android -j$(nproc) colored=yes tools=no target=release_debug | |
scons p=android -j$(nproc) colored=yes tools=no target=release | |
# Create APK using Gradle | |
cd platform/android/java | |
./gradlew build | |
# Copy to export templates directory | |
cd ../../../bin/ | |
cp android_debug.apk android_release.apk $HOME/.godot/templates/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment