From ee102f8b37f1f49b70f31ad79bc3ffd86df9d643 Mon Sep 17 00:00:00 2001 From: crimean Date: Tue, 7 Aug 2018 21:24:35 +0300 Subject: [PATCH] Replace gnustl_shared with c++_shared --- OsmAnd/.gitignore | 1 + OsmAnd/build.gradle | 18 +++++++----------- OsmAnd/jni/Application.mk | 4 ++-- OsmAnd/libs/.gitignore | 3 ++- .../plus/render/NativeOsmandLibrary.java | 4 ++-- build.gradle | 2 +- 6 files changed, 15 insertions(+), 17 deletions(-) diff --git a/OsmAnd/.gitignore b/OsmAnd/.gitignore index e21533b7c3..5f59a8e51a 100644 --- a/OsmAnd/.gitignore +++ b/OsmAnd/.gitignore @@ -27,6 +27,7 @@ local.properties raw/ obj/ libgnustl/ +libc++/ cpd.xml jni/Local.mk out/ diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index fd06694d06..b5d90b93c3 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -103,7 +103,7 @@ android { } legacy { - jniLibs.srcDirs = ["libgnustl"] + jniLibs.srcDirs = ["libc++"] } } @@ -311,16 +311,12 @@ task cleanupDuplicatesInCore() { dependsOn buildOsmAndCore // doesn't work for legacy debug builds doLast { - file("libgnustl/arm64-v8a").mkdirs() - file("libs/arm64-v8a/libgnustl_shared.so").renameTo(file("libgnustl/arm64-v8a/libgnustl_shared.so")) - file("libgnustl/armeabi").mkdirs() - file("libs/armeabi/libgnustl_shared.so").renameTo(file("libgnustl/armeabi/libgnustl_shared.so")) - file("libgnustl/armeabi-v7a").mkdirs() - file("libs/armeabi-v7a/libgnustl_shared.so").renameTo(file("libgnustl/armeabi-v7a/libgnustl_shared.so")) - file("libgnustl/mips").mkdirs() - file("libs/mips/libgnustl_shared.so").renameTo(file("libgnustl/mips/libgnustl_shared.so")) - file("libgnustl/x86").mkdirs() - file("libs/x86/libgnustl_shared.so").renameTo(file("libgnustl/x86/libgnustl_shared.so")) + file("libc++/armeabi-v7a").mkdirs() + file("libs/armeabi-v7a/libc++_shared.so").renameTo(file("libc++/armeabi-v7a/libc++_shared.so")) + file("libc++/arm64-v8a").mkdirs() + file("libs/arm64-v8a/libc++_shared.so").renameTo(file("libc++/arm64-v8a/libc++_shared.so")) + file("libc++/x86").mkdirs() + file("libs/x86/libc++_shared.so").renameTo(file("libc++/x86/libc++_shared.so")) } } afterEvaluate { diff --git a/OsmAnd/jni/Application.mk b/OsmAnd/jni/Application.mk index 750aa29dab..7a414269e8 100755 --- a/OsmAnd/jni/Application.mk +++ b/OsmAnd/jni/Application.mk @@ -1,5 +1,5 @@ -APP_STL := gnustl_shared -# APP_STL := c++_shared +# APP_STL := gnustl_shared +APP_STL := c++_shared APP_CPPFLAGS := -std=c++11 -fexceptions -frtti APP_SHORT_COMMANDS := true diff --git a/OsmAnd/libs/.gitignore b/OsmAnd/libs/.gitignore index 70720366ac..0ebe3445ff 100644 --- a/OsmAnd/libs/.gitignore +++ b/OsmAnd/libs/.gitignore @@ -1,4 +1,5 @@ armeabi/ x86/ armeabi-v7a/ -mips/ \ No newline at end of file +mips/ +arm64-v8a/ \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java b/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java index f0e1ed4ae6..896000a5bd 100644 --- a/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java +++ b/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java @@ -33,8 +33,8 @@ public class NativeOsmandLibrary extends NativeLibrary { if (!isLoaded()) { isNativeSupported = false; try { - log.debug("Loading native gnustl_shared..."); //$NON-NLS-1$ - System.loadLibrary("gnustl_shared"); + log.debug("Loading native c++_shared..."); //$NON-NLS-1$ + System.loadLibrary("c++_shared"); log.debug("Loading native libraries..."); //$NON-NLS-1$ System.loadLibrary("osmand"); log.debug("Creating NativeOsmandLibrary instance..."); //$NON-NLS-1$ diff --git a/build.gradle b/build.gradle index 86094967d2..563ba46351 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { //classpath 'com.android.tools.build:gradle:2.+' - classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.google.gms:google-services:3.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }