Skip to content

Commit

Permalink
Make use of fbjni
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Emil Sjolander authored and Facebook Github Bot 2 committed Aug 31, 2016
1 parent 1051c39 commit 94bbbde
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 214 deletions.
9 changes: 5 additions & 4 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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'],
)
Expand Down
3 changes: 3 additions & 0 deletions CSSLAYOUT_DEFS
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class allow_unsafe_import:
pass
def __exit__(self, type, value, traceback):
pass

def css_layout_dep(name):
return '//' + name
210 changes: 0 additions & 210 deletions java/jni/CSSJNI.c

This file was deleted.

Loading

0 comments on commit 94bbbde

Please sign in to comment.