This commit is contained in:
khanhduytran0 2020-10-19 12:57:01 +07:00
parent b1f4038854
commit ed9a626644
4 changed files with 9 additions and 7 deletions

View File

@ -4,17 +4,16 @@ Based on http://openjdk.java.net/projects/mobile/android.html
### Setup ### Setup
- Download Android NDK r14 from https://developer.android.com/ndk/downloads/older_releases.html and place it in this directory (Can't automatically download because of EULA) - Download Android NDK r14 from https://developer.android.com/ndk/downloads/older_releases.html and place it in this directory (Can't automatically download because of EULA)
- Rename to `android-ndk-linux-x86_64.zip`.
### Environment variables ### Architecture specific environment variables
<table> <table>
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th align="center" colspan="7">Architectures</th> <th align="center" colspan="7">Environment variables</th>
</tr> </tr>
<tr> <tr>
<th>Env var</th> <th>Architectures</th>
<th align="center">TARGET</th> <th align="center">TARGET</th>
<th align="center">TARGET_JDK</th> <th align="center">TARGET_JDK</th>
</tr> </tr>
@ -45,6 +44,7 @@ Based on http://openjdk.java.net/projects/mobile/android.html
### Run in this directory: ### Run in this directory:
``` ```
export NDK_VERSION=r14
./extractndk.sh ./extractndk.sh
./getlibs.sh ./getlibs.sh
./maketoolchain.sh ./maketoolchain.sh

View File

@ -3,7 +3,7 @@ set -e
. setdevkitpath.sh . setdevkitpath.sh
wget -nc -nv -O android-ndk-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-r14-linux-x86_64.zip" wget -nc -nv -O android-ndk-$NDK_VERSION-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip"
./extractndk.sh ./extractndk.sh
./getlibs.sh ./getlibs.sh
./maketoolchain.sh ./maketoolchain.sh

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
unzip -q android-ndk-linux-x86_64.zip unzip -q android-ndk-$NDK_VERSION-linux-x86_64.zip

View File

@ -1,3 +1,5 @@
export NDK_VERSION=r14
# Override GitHub Actions env vars # Override GitHub Actions env vars
if [ "$TARGET_JDK" == "aarch64" ] if [ "$TARGET_JDK" == "aarch64" ]
@ -7,7 +9,7 @@ else
export TARGET_SHORT=$TARGET_JDK export TARGET_SHORT=$TARGET_JDK
fi fi
export NDK_HOME=`pwd`/android-ndk-r* export NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
export NDK=$NDK_HOME export NDK=$NDK_HOME
export ANDROID_DEVKIT=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain export ANDROID_DEVKIT=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain