Specify a platform argument for //yoga/java:jni

Summary: Specify that the jni rule is really for android

Reviewed By: emilsjolander

Differential Revision: D7015911

fbshipit-source-id: 5fbff4bb15d2d1256261b13417653b68bb6dc5aa
This commit is contained in:
Michael Lee
2018-02-20 14:36:49 -08:00
committed by Facebook Github Bot
parent f73b5057ac
commit 5726a71b62
2 changed files with 5 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
load("//:yoga_defs.bzl", "FBJNI_TARGET", "JNI_TARGET", "INFER_ANNOTATIONS_TARGET", "JSR_305_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "SOLOADER_TARGET", "JUNIT_TARGET", "FBJNI_JAVA_TARGET", "CXX_LIBRARY_WHITELIST", "yoga_dep", "cxx_library", "java_library", "java_test", "java_binary")
load("//:yoga_defs.bzl", "FBJNI_TARGET", "JNI_TARGET", "INFER_ANNOTATIONS_TARGET", "JSR_305_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "SOLOADER_TARGET", "JUNIT_TARGET", "FBJNI_JAVA_TARGET", "CXX_LIBRARY_WHITELIST", "ANDROID", "yoga_dep", "cxx_library", "java_library", "java_test", "java_binary")
cxx_library(
name = "jni",
@@ -18,6 +18,7 @@ cxx_library(
"-O3",
"-std=c++11",
],
platforms = ANDROID,
soname = "libyoga.$(ext)",
visibility = ["PUBLIC"],
deps = [

View File

@@ -12,6 +12,7 @@ JNI_TARGET = '//lib/jni:jni'
FBJNI_TARGET = '//lib/fb:fbjni'
FBJNI_JAVA_TARGET = '//lib/fb/src/main/java/com/facebook/jni:jni'
APPCOMPAT_TARGET = '//lib/appcompat:appcompat'
ANDROID = ''
ANDROID_SUPPORT_TARGET = '//lib/android-support:android-support'
ANDROID_TARGET = '//android:android'
ANDROID_JAVA_TARGET = '//android/src/main/java/com/facebook/yoga/android:android'
@@ -74,6 +75,8 @@ def apple_test(*args, **kwargs):
_original_cxx_library = cxx_library
def cxx_library(*args, **kwargs):
# Currently unused
kwargs.pop("platforms", None)
_original_cxx_library(*args, **kwargs)