diff --git a/Android/app/build.gradle b/Android/app/build.gradle index c99974e9..67ef6aec 100755 --- a/Android/app/build.gradle +++ b/Android/app/build.gradle @@ -24,7 +24,7 @@ android { } } - project.tasks.preBuild.dependsOn("webProd") +// project.tasks.preBuild.dependsOn("webProd") ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" diff --git a/Android/app/src/main/cpp/Android.mk b/Android/app/src/main/cpp/Android.mk index 5eb87996..417a4c8b 100644 --- a/Android/app/src/main/cpp/Android.mk +++ b/Android/app/src/main/cpp/Android.mk @@ -5,13 +5,30 @@ 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 +include $(BUILD_SHARED_LIBRARY) + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE:= libsystemproperties +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) +LOCAL_STATIC_LIBRARIES := libcxx +LOCAL_CFLAGS := -std=c++17 +LOCAL_SRC_FILES := \ + properties.cpp \ + context_node.cpp \ + contexts_serialized.cpp \ + contexts_split.cpp \ + prop_area.cpp \ + prop_info.cpp \ + system_properties.cpp \ + system_property_api.cpp \ + system_property_set.cpp \ + property_info_parser.cpp + +include $(BUILD_STATIC_LIBRARY) diff --git a/Android/app/src/main/cpp/properties.cpp b/Android/app/src/main/cpp/properties.cpp index c37ccb1d..0e42ae58 100644 --- a/Android/app/src/main/cpp/properties.cpp +++ b/Android/app/src/main/cpp/properties.cpp @@ -1,10 +1,12 @@ #include #include #include -//#include +//#include + +#define JNICALL extern "C" -JNIEXPORT jstring JNICALL +JNIEXPORT jstring extern "C" JNICALL Java_com_dergoogler_core_NativeProperties_get(JNIEnv *env, jclass clazz, jstring key, jstring def) { const char *myKey = env->GetStringUTFChars(key, 0);