Android: update tools (gradle, NDK) & prepare to switch to clang
authorLoic Blot <loic.blot@unix-experience.fr>
Sun, 11 Mar 2018 15:52:53 +0000 (16:52 +0100)
committerLoic Blot <loic.blot@unix-experience.fr>
Sun, 11 Mar 2018 15:52:53 +0000 (16:52 +0100)
build/android/Makefile
build/android/build.gradle
build/android/gradle/wrapper/gradle-wrapper.properties
build/android/jni/Deps.mk

index df1b01ae95e8c2c4a017cb33f09e472137035259..24f640a7fbf4af2a1f557c34e33b628ed0d497e7 100644 (file)
@@ -31,11 +31,11 @@ TARGET_HOST = arm-linux
 TARGET_ABI = armeabi-v7a
 TARGET_LIBDIR = armeabi-v7a
 TARGET_TOOLCHAIN = arm-linux-androideabi-
-TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3 -D__ANDROID_API__=$(API)
+TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3
 TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
 TARGET_ARCH = armv7
 CROSS_PREFIX = arm-linux-androideabi-
-COMPILER_VERSION = 4.9
+COMPILER_VERSION = clang
 HAVE_LEVELDB = 0
 
 ################################################################################
index 0d525748b8f365f1e7d62983470b4e041d730a31..b4dfd90852ec9ba619f70394479f46b10024a71e 100644 (file)
@@ -1,9 +1,11 @@
 buildscript {
        repositories {
                mavenCentral()
+               jcenter()
+               google()
        }
        dependencies {
-               classpath "com.android.tools.build:gradle:1.5.0"
+               classpath "com.android.tools.build:gradle:3.0.1"
        }
 }
 
@@ -11,7 +13,7 @@ apply plugin: "com.android.application"
 
 android {
        compileSdkVersion 25
-       buildToolsVersion "25.0.3"
+       buildToolsVersion "26.0.2"
 
        defaultConfig {
                versionCode 17
@@ -20,6 +22,12 @@ android {
                targetSdkVersion 14
                applicationId "net.minetest.minetest"
                manifestPlaceholders = [ package: "net.minetest.minetest", project: project.name ]
+               ndk {
+                       // Specifies the ABI configurations of your native
+                       // libraries Gradle should build and package with your APK.
+                       abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a',
+                       'arm64-v8a'
+               }
        }
 
        lintOptions {
index 980438b75cbb3fc0fffcc6dab940085e36b56f8d..9d1a1850d26518683415853f69aafa2f59f621e1 100644 (file)
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
index 36af338b204c92d18f53d230c31fd84162279ff3..cc6e5674715231e59c141e14680d11f44ffee293 100644 (file)
@@ -1,7 +1,7 @@
 APP_PLATFORM := ${APP_PLATFORM}
 APP_ABI := ${TARGET_ABI}
-APP_STL := gnustl_static
-NDK_TOOLCHAIN_VERSION := 4.9
+APP_STL := c++_shared
+NDK_TOOLCHAIN_VERSION := ${COMPILER_VERSION}
 APP_DEPRECATED_HEADERS := true
 
 APP_CLAFGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3