From d506e6ab94484c0b869dbf887a1d4b866da142b2 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Sat, 8 Oct 2016 06:20:12 -0700 Subject: [PATCH] Enable running within robolectric Summary: Add some dependencies to enable running the native version of csslayout within robolectric internally. Reviewed By: lucasr Differential Revision: D3960840 fbshipit-source-id: 08a45f7299b04f70f643b0c9b95da13f90690dd8 --- BUCK | 3 +-- CSSLAYOUT_DEFS | 4 +--- lib/fb/BUCK | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/BUCK b/BUCK index 38af7dc2..57eacbf9 100644 --- a/BUCK +++ b/BUCK @@ -43,9 +43,8 @@ cxx_library( srcs = glob(['java/jni/*.cpp']), header_namespace = '', compiler_flags = JNI_COMPILER_FLAGS, - deps = [ + deps = JNI_DEPS + [ ':CSSLayout', - css_layout_dep('lib/fb:fbjni'), ], visibility = ['PUBLIC'], ) diff --git a/CSSLAYOUT_DEFS b/CSSLAYOUT_DEFS index 94904b5f..e33cf002 100644 --- a/CSSLAYOUT_DEFS +++ b/CSSLAYOUT_DEFS @@ -7,12 +7,10 @@ PROGRUARD_ANNOTATIONS_TARGET = '//java/com/facebook/proguard/annotations:annotat SOLOADER_TARGET = '//lib/soloader:soloader' GTEST_TARGET = '//lib/gtest:gtest' GTEST_DL_URL = 'https://github.com/google/googletest/archive/release-1.7.0.zip' +JNI_DEPS = ['//lib/fb:fbjni'] class allow_unsafe_import: def __enter__(self): pass def __exit__(self, type, value, traceback): pass - -def css_layout_dep(name): - return '//' + name diff --git a/lib/fb/BUCK b/lib/fb/BUCK index 8bf78259..45fdc370 100644 --- a/lib/fb/BUCK +++ b/lib/fb/BUCK @@ -35,8 +35,8 @@ cxx_library( '-Wno-unused-parameter', '-std=c++11', ], - deps = [ + deps = JNI_DEPS + [ ':ndklog', ], - visibility = [CSSLAYOUT_ROOT], + visibility = ['PUBLIC'], )