From e19260a23dafc24443c0d52b3194f937efb9cbe5 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Mon, 19 Oct 2020 12:42:16 +0700 Subject: [PATCH] Use NDK 14 --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++ README.txt | 22 ------------------ ci_build_arch_aarch32.sh | 1 - ci_build_arch_aarch64.sh | 1 - ci_build_arch_x86.sh | 1 - ci_build_arch_x86_64.sh | 1 - ci_build_global.sh | 9 +++++++- extractndk.sh | 2 +- setdevkitpath.sh | 2 +- 9 files changed, 60 insertions(+), 29 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..5c59075 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +Based on http://openjdk.java.net/projects/mobile/android.html + +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) + +## Building + +### Environment variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Architectures
Env varTARGETTARGET_JDK
armv8/aarch64aarch64-linux-androidaarch64
armv7/aarch32arm-linux-androideabiarm
x86/i686i686-linux-androidx86
x86_64/amd64x86_64-linux-androidx86_64
+ +### Run in this directory: +``` +bash ci_build_global.sh +``` + diff --git a/README.txt b/README.txt deleted file mode 100644 index 7288dba..0000000 --- a/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -Based on http://openjdk.java.net/projects/mobile/android.html - -Download Android NDK r10e from https://developer.android.com/ndk/downloads/older_releases.html and place it in this directory - -(Can't automatically download because of EULA) - -Run in this directory: - -./extractndk.sh -./getlibs.sh -./maketoolchain.sh -./clonejdk.sh -./buildlibs.sh -./buildjdk.sh -./removejdkdebuginfo.sh -./tarjdk.sh - -For x86: -./maketoolchain_x86.sh -./reextractlibs_x86.sh -./buildlibs_x86.sh -./buildjdk_x86.sh diff --git a/ci_build_arch_aarch32.sh b/ci_build_arch_aarch32.sh index 4c48b0b..9729f93 100644 --- a/ci_build_arch_aarch32.sh +++ b/ci_build_arch_aarch32.sh @@ -2,7 +2,6 @@ set -e export TARGET=arm-linux-androideabi -export TARGET_SHORT=arm export TARGET_JDK=arm bash ci_build_global.sh diff --git a/ci_build_arch_aarch64.sh b/ci_build_arch_aarch64.sh index d291a14..e429f9e 100644 --- a/ci_build_arch_aarch64.sh +++ b/ci_build_arch_aarch64.sh @@ -2,7 +2,6 @@ set -e export TARGET=aarch64-linux-android -export TARGET_SHORT=arm64 export TARGET_JDK=aarch64 bash ci_build_global.sh diff --git a/ci_build_arch_x86.sh b/ci_build_arch_x86.sh index 3f6f219..43c9a76 100644 --- a/ci_build_arch_x86.sh +++ b/ci_build_arch_x86.sh @@ -2,7 +2,6 @@ set -e export TARGET=i686-linux-android -export TARGET_SHORT=x86 export TARGET_JDK=x86 bash ci_build_global.sh diff --git a/ci_build_arch_x86_64.sh b/ci_build_arch_x86_64.sh index 7ff9094..52c93c4 100644 --- a/ci_build_arch_x86_64.sh +++ b/ci_build_arch_x86_64.sh @@ -2,7 +2,6 @@ set -e export TARGET=x86_64-linux-android -export TARGET_SHORT=x86_64 export TARGET_JDK=x86_64 bash ci_build_global.sh diff --git a/ci_build_global.sh b/ci_build_global.sh index 56c8379..0c38797 100644 --- a/ci_build_global.sh +++ b/ci_build_global.sh @@ -1,7 +1,14 @@ #!/bin/bash set -e -wget -nc -nv -O android-ndk-r10e-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip" +if [ $TARGET_JDK == "aarch64" ] +then + export TARGET_SHORT=arm64 +else + export TARGET_SHORT=$TARGET_JDK +fi + +wget -nc -nv -O android-ndk-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-r14-linux-x86_64.zip" ./extractndk.sh ./getlibs.sh ./maketoolchain.sh diff --git a/extractndk.sh b/extractndk.sh index 7154e27..9fd9317 100755 --- a/extractndk.sh +++ b/extractndk.sh @@ -1,2 +1,2 @@ #!/bin/sh -unzip -q android-ndk-r10e-linux-x86_64.zip +unzip -q android-ndk-linux-x86_64.zip diff --git a/setdevkitpath.sh b/setdevkitpath.sh index d073074..1361aa3 100644 --- a/setdevkitpath.sh +++ b/setdevkitpath.sh @@ -1,5 +1,5 @@ # Override GitHub Actions env vars -export NDK_HOME=`pwd`/android-ndk-r10e +export NDK_HOME=`pwd`/android-ndk-r* export NDK=$NDK_HOME export ANDROID_DEVKIT=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain