From 70c207cf0b1e152bd5b9c4d2476b3375f84e454b Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 27 Aug 2018 16:06:18 +0800 Subject: [PATCH] some sdk updates on external libs --- app/build.gradle | 5 +++- .../android-openssl/setenv-android-mod.sh | 5 ++-- script/build-external-libs/build-boost.sh | 16 +++++++----- script/build-external-libs/prep-toolchain.sh | 25 ++++++------------- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2fab202..f48e26b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,10 @@ android { buildToolsVersion '28.0.2' defaultConfig { applicationId 'com.wownero.wownerujo' - minSdkVersion 22 + + // No more security updates for Android 5 (sdk 21 and 22), so not supported. + // https://source.android.com/security/bulletin/2018-03-01 + minSdkVersion 23 targetSdkVersion 28 versionCode 1080 versionName '1.6.4.0' diff --git a/script/build-external-libs/android-openssl/setenv-android-mod.sh b/script/build-external-libs/android-openssl/setenv-android-mod.sh index f4ec2a7..f010548 100755 --- a/script/build-external-libs/android-openssl/setenv-android-mod.sh +++ b/script/build-external-libs/android-openssl/setenv-android-mod.sh @@ -15,7 +15,7 @@ # try to pick it up with the value of _ANDROID_NDK_ROOT below. If # ANDROID_NDK_ROOT is set, then the value is ignored. # _ANDROID_NDK="android-ndk-r8e" -_ANDROID_NDK="android-ndk-r10d" +_ANDROID_NDK="android-ndk-r17b" # _ANDROID_NDK="android-ndk-r10" # Set _ANDROID_EABI to the EABI you want to use. You can find the @@ -37,7 +37,8 @@ _ANDROID_NDK="android-ndk-r10d" # This value is always used. # _ANDROID_API="android-14" #_ANDROID_API="android-18" -_ANDROID_API="android-21" +# _ANDROID_API="android-21" +_ANDROID_API="android-23" ##################################################################### diff --git a/script/build-external-libs/build-boost.sh b/script/build-external-libs/build-boost.sh index f51241c..4f8a3cd 100755 --- a/script/build-external-libs/build-boost.sh +++ b/script/build-external-libs/build-boost.sh @@ -17,23 +17,27 @@ args="--build-type=minimal link=static runtime-link=static --with-chrono \ --with-date_time --with-filesystem --with-program_options --with-regex \ --with-serialization --with-system --with-thread \ --includedir=$build_root/build/boost/include \ ---toolset=clang threading=multi threadapi=pthread target-os=android \ -install" +--toolset=clang-android threading=multi threadapi=pthread target-os=android" echo $args PATH=$build_root/tool/arm/arm-linux-androideabi/bin:$build_root/tool/arm/bin:$PATH \ - ./b2 --build-dir=android-arm --prefix=$build_root/build/boost/arm $args + ./b2 --build-dir=android-arm --prefix=$build_root/build/boost/arm $args \ + --arch=armeabi-v7a \ + install ln -sf ../include $build_root/build/boost/arm PATH=$build_root/tool/arm64/aarch64-linux-androideabi/bin:$build_root/tool/arm64/bin:$PATH \ - ./b2 --build-dir=android-arm64 --prefix=$build_root/build/boost/arm64 $args + ./b2 --build-dir=android-arm64 --prefix=$build_root/build/boost/arm64 $args \ + install ln -sf ../include $build_root/build/boost/arm64 PATH=$build_root/tool/x86/i686-linux-android/bin:$build_root/tool/x86/bin:$PATH \ - ./b2 --build-dir=android-x86--prefix=$build_root/build/boost/x86 $args + ./b2 --build-dir=android-x86--prefix=$build_root/build/boost/x86 $args \ + install ln -sf ../include $build_root/build/boost/x86 PATH=$build_root/tool/x86_64/x86_64-linux-android/bin:$build_root/tool/x86_64/bin:$PATH \ - ./b2 --build-dir=android-x86_64 --prefix=$build_root/build/boost/x86_64 $args + ./b2 --build-dir=android-x86_64 --prefix=$build_root/build/boost/x86_64 $args \ + install ln -sf ../include $build_root/build/boost/x86_64 diff --git a/script/build-external-libs/prep-toolchain.sh b/script/build-external-libs/prep-toolchain.sh index d6f00f2..016cf54 100755 --- a/script/build-external-libs/prep-toolchain.sh +++ b/script/build-external-libs/prep-toolchain.sh @@ -5,25 +5,16 @@ set -e source script/build-external-libs/env.sh build_root=$EXTERNAL_LIBS_BUILD_ROOT - PATH=$ANDROID_NDK_ROOT/build/tools/:$PATH -if [ ! -d "$build_root/tool/arm" ]; then - echo "installing arm" - make_standalone_toolchain.py --api 21 --stl=libc++ --arch arm --install-dir $build_root/tool/arm -fi +args="--api 23 --stl=libc++" +archs=(arm arm64 x86 x86_64) -if [ ! -d "$build_root/tool/arm64" ]; then - echo "installing arm64" - make_standalone_toolchain.py --api 21 --stl=libc++ --arch arm64 --install-dir $build_root/tool/arm64 -fi +for arch in ${archs[@]}; do -if [ ! -d "$build_root/tool/x86" ]; then - echo "installing x86" - make_standalone_toolchain.py --api 21 --stl=libc++ --arch x86 --install-dir $build_root/tool/x86 -fi + if [ ! -d "$build_root/tool/$arch" ]; then + echo "installing $arch" + make_standalone_toolchain.py $args --arch $arch --install-dir $build_root/tool/$arch + fi -if [ ! -d "$build_root/tool/x86_64" ]; then - echo "installing x86_64" - make_standalone_toolchain.py --api 21 --stl=libc++ --arch x86_64 --install-dir $build_root/tool/x86_64 -fi +done