try to use realm core so's (which don't exist yet)

This commit is contained in:
Ari Lazier 2015-12-02 14:56:20 -08:00
parent 3c5a35640c
commit ee341c4fe7
3 changed files with 14 additions and 13 deletions

View File

@ -21,23 +21,18 @@ task createNativeDepsDirectories {
thirdPartyNdkDir.mkdirs()
}
task downloadRealmCore(dependsOn: createNativeDepsDirectories, type: Download) {
// Use ZIP version as it's faster this way to selectively extract some parts of the archive
task downloadRealmCore(type: Download) {
src 'http://static.realm.io/downloads/core/realm-core-android-0.94.4.tar.gz'
onlyIfNewer true
overwrite false
dest new File(downloadsDir, 'realm-core-android-0.94.4.tar.gz')
}
task prepareRealmCore(dependsOn: downloadRealmCore) {
inputs.files downloadRealmCore.dest
outputs.dir "$thirdPartyNdkDir/realm-core"
doLast {
task prepareRealmCore(dependsOn: downloadRealmCore) << {
copy {
from { tarTree(downloadRealmCore.dest) }
//include 'realm-core-android-0.94.4/*.so', 'realm-core-android-0.94.4/include/**/*.hpp'
into "$thirdPartyNdkDir/realm-core"
}
from 'src/main/jni/third-party/realm-core/Android.mk'
into "$thirdPartyNdkDir/realm-core";
}
}

View File

@ -28,15 +28,15 @@ LOCAL_C_INCLUDES := src/object-store
LOCAL_C_INCLUDES += src/object-store/parser
LOCAL_C_INCLUDES += ../../../../../../../vendor
LOCAL_C_INCLUDES += ../../../../../../../vendor/PEGTL
LOCAL_C_INCLUDES += ../../../../../../../core/include
LOCAL_CFLAGS += -fexceptions -std=c++14 -frtti -Wno-extern-c-compat
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_SHARED_LIBRARIES := libjsc librealm
LOCAL_SHARED_LIBRARIES := libjsc librealm-core
include $(BUILD_SHARED_LIBRARY)
$(call import-module,realm-core)
$(call import-module,jsc)

View File

@ -0,0 +1,6 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= realm-core
LOCAL_SRC_FILES := librealm-android-$(TARGET_ARCH_ABI).so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)