Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Oct 27, 2023
1 parent 2ff0cb5 commit 9abaae5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
}
}

project.tasks.preBuild.dependsOn("webProd")
// project.tasks.preBuild.dependsOn("webProd")

ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
Expand Down
29 changes: 23 additions & 6 deletions Android/app/src/main/cpp/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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)
6 changes: 4 additions & 2 deletions Android/app/src/main/cpp/properties.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include <jni.h>
#include <cstring>
#include <sys/system_properties.h>
//#include <cutils/properties.h>
//#include <system_properties.h>

#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);
Expand Down

0 comments on commit 9abaae5

Please sign in to comment.