diff --git a/README.md b/README.md index be55b7e..1643fbe 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,16 @@ Based on http://openjdk.java.net/projects/mobile/android.html ### 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) -- Rename to `android-ndk-linux-x86_64.zip`. -### Environment variables +### Architecture specific environment variables - + - + @@ -45,6 +44,7 @@ Based on http://openjdk.java.net/projects/mobile/android.html ### Run in this directory: ``` +export NDK_VERSION=r14 ./extractndk.sh ./getlibs.sh ./maketoolchain.sh diff --git a/ci_build_global.sh b/ci_build_global.sh index 8e7118f..911e494 100644 --- a/ci_build_global.sh +++ b/ci_build_global.sh @@ -3,7 +3,7 @@ set -e . 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 ./getlibs.sh ./maketoolchain.sh diff --git a/extractndk.sh b/extractndk.sh index 9fd9317..785ed36 100755 --- a/extractndk.sh +++ b/extractndk.sh @@ -1,2 +1,2 @@ #!/bin/sh -unzip -q android-ndk-linux-x86_64.zip +unzip -q android-ndk-$NDK_VERSION-linux-x86_64.zip diff --git a/setdevkitpath.sh b/setdevkitpath.sh index 2ba3c23..12d6ae5 100644 --- a/setdevkitpath.sh +++ b/setdevkitpath.sh @@ -1,3 +1,5 @@ +export NDK_VERSION=r14 + # Override GitHub Actions env vars if [ "$TARGET_JDK" == "aarch64" ] @@ -7,7 +9,7 @@ else export TARGET_SHORT=$TARGET_JDK fi -export NDK_HOME=`pwd`/android-ndk-r* +export NDK_HOME=`pwd`/android-ndk-$NDK_VERSION export NDK=$NDK_HOME export ANDROID_DEVKIT=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
ArchitecturesEnvironment variables
Env varArchitectures TARGET TARGET_JDK