Fix issues with running test in open source

Summary: Travis builds have been broken for a while. This diff fixes some of the issues surrounding bad buck file configuration as well as missing jni.h file.

Reviewed By: astreet

Differential Revision: D4148724

fbshipit-source-id: 1e284db61280326a4bcbb9337e804a4804348aa6
This commit is contained in:
Emil Sjolander
2016-11-09 11:31:22 -08:00
committed by Facebook Github Bot
parent a253c6fbb7
commit f5912a97e4
6 changed files with 1186 additions and 6 deletions

View File

@@ -7,7 +7,9 @@ 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']
JNI_TARGET = '//lib/jni:jni'
FBJNI_TARGET = '//lib/fb:fbjni'
CXX_LIBRARY_WHITELIST = [
'//lib/fb:fbjni',

View File

@@ -20,7 +20,9 @@ cxx_library(
'-O3',
'-std=c++11',
],
deps = JNI_DEPS + [
deps = [
FBJNI_TARGET,
JNI_TARGET,
csslayout_dep(':CSSLayout'),
],
visibility = ['PUBLIC'],
@@ -30,7 +32,7 @@ java_library(
name = 'java',
srcs = glob(['com/facebook/csslayout/*.java']),
tests=[
csslayout_dep('/java:tests'),
csslayout_dep('java:tests'),
],
source = '1.7',
target = '1.7',
@@ -47,10 +49,11 @@ java_library(
java_test(
name = 'tests',
srcs = glob(['tests/**/*.java']),
use_cxx_libraries = True,
cxx_library_whitelist = CXX_LIBRARY_WHITELIST,
deps = [
':java',
JUNIT_TARGET,
],
use_cxx_libraries = True,
cxx_library_whitelist = CXX_LIBRARY_WHITELIST,
visibility = ['PUBLIC'],
)

View File

@@ -34,8 +34,9 @@ cxx_library(
'-Wno-unused-parameter',
'-std=c++11',
],
deps = JNI_DEPS + [
deps = [
':ndklog',
JNI_TARGET,
],
visibility = ['PUBLIC'],
)

17
lib/jni/BUCK Normal file
View File

@@ -0,0 +1,17 @@
# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
cxx_library(
name = 'jni',
force_static = True,
header_namespace = '',
exported_headers = [
'jni.h',
'real/jni.h',
],
visibility = ['PUBLIC'],
)

16
lib/jni/jni.h Normal file
View File

@@ -0,0 +1,16 @@
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#ifdef __ANDROID__
#include_next <jni.h>
#else
#include "real/jni.h"
#endif

1141
lib/jni/real/jni.h Normal file

File diff suppressed because it is too large Load Diff