Skip to content

Commit

Permalink
Resolved issues #40 and #51
Browse files Browse the repository at this point in the history
Now using LiquidCoreCommon code in Android
  • Loading branch information
ericwlange committed Aug 24, 2018
1 parent 5a24cec commit d155bf8
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 2,981 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/local.properties
/.idea/workspace.xml
/.idea/libraries
/.idea/caches
.DS_Store
/build
/captures
Expand Down
29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 4 additions & 21 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions LiquidCoreAndroid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ set( SOURCES
src/main/cpp/JSC/OpaqueJSString.cpp
src/main/cpp/JSC/OpaqueJSValue.cpp

# Common Node.js between Android & iOS
../LiquidCoreCommon/node/NodeInstance.cpp
../LiquidCoreCommon/node/nodedroid_file.cc
../LiquidCoreCommon/node/os_dependent.cpp
../LiquidCoreCommon/node/process_wrap.cc

# Node.js
src/main/cpp/node/JNI_Process.cpp
src/main/cpp/node/nodedroid_file.cc
src/main/cpp/node/NodeInstance.cpp
src/main/cpp/node/process_wrap.cc
src/main/cpp/node/sqlite3_shim.cpp
)

Expand Down Expand Up @@ -120,6 +123,7 @@ include_directories(
src/../../deps/sqlite-autoconf-3150000
src/../../deps/nan-2.5.1
src/../../deps/boost_1_66_0
src/../../LiquidCoreCommon/node
)

find_library( # Sets the name of the path variable.
Expand Down
25 changes: 13 additions & 12 deletions LiquidCoreAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,32 @@ apply plugin: 'jacoco'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 26
compileSdkVersion 27
buildToolsVersion '26.0.3'

defaultConfig {
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 4
versionName "0.4.6"
versionName "0.5.0"
setProperty("archivesBaseName", "LiquidCore")
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
//multiDexEnabled true
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -fexceptions"
abiFilters "x86", "armeabi-v7a" //, "x86_64", "arm64-v8a"
abiFilters "x86", "armeabi-v7a", "x86_64", "arm64-v8a"
arguments "-DANDROID_TOOLCHAIN=gcc", "-DANDROID_STL=gnustl_static","-DANDROID_CPP_FEATURES=rtti exceptions"
}
}
sourceSets {
main {
jni.srcDirs = []
release.jniLibs.srcDirs = ['../deps/node-8.9.3/prebuilt/32bit/nosymbols'
//, '../deps/node-8.9.3/prebuilt/64bit/nosymbols'
release.jniLibs.srcDirs = ['../deps/node-8.9.3/prebuilt/32bit/nosymbols',
'../deps/node-8.9.3/prebuilt/64bit/nosymbols'
]
debug.jniLibs.srcDirs = ['../deps/node-8.9.3/prebuilt/32bit/symbols'
//, '../deps/node-8.9.3/prebuilt/64bit/symbols'
debug.jniLibs.srcDirs = ['../deps/node-8.9.3/prebuilt/32bit/symbols',
'../deps/node-8.9.3/prebuilt/64bit/symbols'
]
}
}
Expand All @@ -50,7 +51,7 @@ android {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a' //, 'x86_64', 'arm64-v8a'
include 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
universalApk true
}
}
Expand All @@ -65,9 +66,9 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
debugImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
androidTestImplementation 'com.android.support:support-annotations:27.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
}

Expand Down
1 change: 0 additions & 1 deletion LiquidCoreAndroid/src/main/cpp/JNI/JNI_JSValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ NATIVE(JNIJSValue,jboolean,isEqual) (PARAMS, jlong a_, jlong b_)
if (!a->IsDefunct()) {
V8_ISOLATE_CTX(a->Context(), isolate, context)
auto b = SharedWrap<JSValue>::Shared(a->Context(), b_);
Local<Value> value = a->Value();

TryCatch trycatch(isolate);

Expand Down
Loading

0 comments on commit d155bf8

Please sign in to comment.