diff --git a/Android/app/build.gradle b/Android/app/build.gradle index 357adb78..c99974e9 100755 --- a/Android/app/build.gradle +++ b/Android/app/build.gradle @@ -23,6 +23,9 @@ android { arguments "-DANDROID_STL=c++_shared" } } + + project.tasks.preBuild.dependsOn("webProd") + ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } @@ -43,7 +46,7 @@ android { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' multiDexEnabled true - project.tasks.preBuild.dependsOn("webProd") + // project.tasks.preBuild.dependsOn("webProd") } debug { resValue "string", "app_name", "${app_name} Debug" @@ -52,12 +55,12 @@ android { minifyEnabled false multiDexEnabled false applicationIdSuffix '.debug' - project.tasks.preBuild.dependsOn("webDev") + // project.tasks.preBuild.dependsOn("webDev") } } externalNativeBuild { - cmake { - path = file("src/main/cpp/CMakeLists.txt") + ndkBuild { + path("src/main/cpp/Android.mk") } } compileOptions { diff --git a/Android/app/src/main/cpp/Android.mk b/Android/app/src/main/cpp/Android.mk new file mode 100644 index 00000000..5eb87996 --- /dev/null +++ b/Android/app/src/main/cpp/Android.mk @@ -0,0 +1,17 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := libshell +LOCAL_SRC_FILES := shell.cpp +include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := libproperties +LOCAL_SRC_FILES := properties.cpp +include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := libclog +LOCAL_SRC_FILES := clog.cpp +LOCAL_LDLIBS := -llog +include $(BUILD_SHARED_LIBRARY) \ No newline at end of file diff --git a/Android/app/src/main/cpp/CMakeLists.txt b/Android/app/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 1732d38c..00000000 --- a/Android/app/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Sets the minimum version of CMake required to build your native library. -# This ensures that a certain set of CMake features is available to -# your build. - - -cmake_minimum_required(VERSION 3.4.1) - -# Specifies a library name, specifies whether the library is STATIC or -# SHARED, and provides relative paths to the source code. You can -# define multiple libraries by adding multiple add_library() commands, -# and CMake builds them for you. When you build your app, Gradle -# automatically packages shared libraries with your APK. - - -add_library(native-log-lib SHARED - log.cpp) - -add_library(native-properties-lib SHARED - properties.cpp) - -add_library(native-shell-lib SHARED - shell.cpp) \ No newline at end of file diff --git a/Android/app/src/main/cpp/log.cpp b/Android/app/src/main/cpp/clog.cpp similarity index 100% rename from Android/app/src/main/cpp/log.cpp rename to Android/app/src/main/cpp/clog.cpp diff --git a/Android/app/src/main/java/com/dergoogler/core/NativeLog.java b/Android/app/src/main/java/com/dergoogler/core/NativeLog.java index f19eac00..52061289 100644 --- a/Android/app/src/main/java/com/dergoogler/core/NativeLog.java +++ b/Android/app/src/main/java/com/dergoogler/core/NativeLog.java @@ -5,7 +5,7 @@ public class NativeLog { static { - System.loadLibrary("native-log-lib"); + System.loadLibrary("clog"); } @JavascriptInterface diff --git a/Android/app/src/main/java/com/dergoogler/core/NativeProperties.java b/Android/app/src/main/java/com/dergoogler/core/NativeProperties.java index 7e3d195b..7318db27 100644 --- a/Android/app/src/main/java/com/dergoogler/core/NativeProperties.java +++ b/Android/app/src/main/java/com/dergoogler/core/NativeProperties.java @@ -5,7 +5,7 @@ public class NativeProperties { static { - System.loadLibrary("native-properties-lib"); + System.loadLibrary("properties"); } @JavascriptInterface diff --git a/Android/app/src/main/java/com/dergoogler/core/NativeShell.java b/Android/app/src/main/java/com/dergoogler/core/NativeShell.java index 3b78b7b7..35829a13 100644 --- a/Android/app/src/main/java/com/dergoogler/core/NativeShell.java +++ b/Android/app/src/main/java/com/dergoogler/core/NativeShell.java @@ -19,7 +19,7 @@ public NativeShell(WebView wv) { } static { - System.loadLibrary("native-shell-lib"); + System.loadLibrary("shell"); } @JavascriptInterface