Make use of fbjni

Summary: Use fbjni for safer and easier jni bridging. This diff includes all of fbjni as it currently does not live as its own open source project. The code was copied from the react-native open source distribution.

Reviewed By: ritzau

Differential Revision: D3764065

fbshipit-source-id: 7ff566af314dcb5279460c322c476ef6f6ed8131
This commit is contained in:
Emil Sjolander
2016-08-31 05:04:02 -07:00
committed by Facebook Github Bot 2
parent 1051c39a59
commit 94bbbde930
5 changed files with 288 additions and 214 deletions

9
BUCK
View File

@@ -21,6 +21,7 @@ GMOCK_OVERRIDE_FLAGS = [
]
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c11']
JNI_COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c++11']
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ['-std=c++11']
cxx_library(
@@ -38,12 +39,12 @@ cxx_library(
cxx_library(
name = 'CSSLayout_jni',
soname = 'libcsslayout.$(ext)',
srcs = glob(['java/jni/*.c']),
exported_headers = subdir_glob([('', 'java/jni/*.h')]),
srcs = glob(['java/jni/*.cpp']),
header_namespace = '',
compiler_flags = COMPILER_FLAGS,
compiler_flags = JNI_COMPILER_FLAGS,
deps = [
':CSSLayout'
':CSSLayout',
css_layout_dep('lib/fb:fbjni'),
],
visibility = ['PUBLIC'],
)