Re-format .bzl to use recommended style.
Summary: This is to make them `buildifier` compatible in order to start using `buildifier` for all .bzl files. Differential Revision: D8069457 fbshipit-source-id: f5bce02a3e6ba8dc4ccbf5bae70de224c30cbd64
This commit is contained in:
committed by
Facebook Github Bot
parent
50e3714b21
commit
ca485dfb50
@@ -1,108 +1,92 @@
|
|||||||
"""Provides macros for working with yoga library."""
|
"""Provides macros for working with yoga library."""
|
||||||
|
|
||||||
YOGA_ROOTS = ['//...']
|
YOGA_ROOTS = ["//..."]
|
||||||
JAVA_TARGET = '//java:java'
|
JAVA_TARGET = "//java:java"
|
||||||
INFER_ANNOTATIONS_TARGET = '//lib/infer-annotations:infer-annotations'
|
INFER_ANNOTATIONS_TARGET = "//lib/infer-annotations:infer-annotations"
|
||||||
JSR_305_TARGET = '//lib/jsr-305:jsr-305'
|
JSR_305_TARGET = "//lib/jsr-305:jsr-305"
|
||||||
JUNIT_TARGET = '//lib/junit:junit'
|
JUNIT_TARGET = "//lib/junit:junit"
|
||||||
PROGRUARD_ANNOTATIONS_TARGET = '//java/proguard-annotations/src/main/java/com/facebook/proguard/annotations:annotations'
|
PROGRUARD_ANNOTATIONS_TARGET = "//java/proguard-annotations/src/main/java/com/facebook/proguard/annotations:annotations"
|
||||||
SOLOADER_TARGET = '//lib/soloader:soloader'
|
SOLOADER_TARGET = "//lib/soloader:soloader"
|
||||||
GTEST_TARGET = '//lib/gtest:gtest'
|
GTEST_TARGET = "//lib/gtest:gtest"
|
||||||
JNI_TARGET = '//lib/jni:jni'
|
JNI_TARGET = "//lib/jni:jni"
|
||||||
FBJNI_TARGET = '//lib/fb:fbjni'
|
FBJNI_TARGET = "//lib/fb:fbjni"
|
||||||
FBJNI_JAVA_TARGET = '//lib/fb/src/main/java/com/facebook/jni:jni'
|
FBJNI_JAVA_TARGET = "//lib/fb/src/main/java/com/facebook/jni:jni"
|
||||||
APPCOMPAT_TARGET = '//lib/appcompat:appcompat'
|
APPCOMPAT_TARGET = "//lib/appcompat:appcompat"
|
||||||
APPLE = ''
|
APPLE = ""
|
||||||
ANDROID = ''
|
ANDROID = ""
|
||||||
ANDROID_SUPPORT_TARGET = '//lib/android-support:android-support'
|
ANDROID_SUPPORT_TARGET = "//lib/android-support:android-support"
|
||||||
ANDROID_TARGET = '//android:android'
|
ANDROID_TARGET = "//android:android"
|
||||||
ANDROID_JAVA_TARGET = '//android/src/main/java/com/facebook/yoga/android:android'
|
ANDROID_JAVA_TARGET = "//android/src/main/java/com/facebook/yoga/android:android"
|
||||||
ANDROID_RES_TARGET = '//android:res'
|
ANDROID_RES_TARGET = "//android:res"
|
||||||
ANDROID_SAMPLE_JAVA_TARGET = '//android/sample/java/com/facebook/samples/yoga:yoga'
|
ANDROID_SAMPLE_JAVA_TARGET = "//android/sample/java/com/facebook/samples/yoga:yoga"
|
||||||
ANDROID_SAMPLE_RES_TARGET = '//android/sample:res'
|
ANDROID_SAMPLE_RES_TARGET = "//android/sample:res"
|
||||||
|
|
||||||
CXX_LIBRARY_WHITELIST = [
|
CXX_LIBRARY_WHITELIST = [
|
||||||
'//:yoga',
|
"//:yoga",
|
||||||
'//lib/fb:fbjni',
|
"//lib/fb:fbjni",
|
||||||
'//java:jni',
|
"//java:jni",
|
||||||
]
|
]
|
||||||
|
|
||||||
BASE_COMPILER_FLAGS = [
|
BASE_COMPILER_FLAGS = [
|
||||||
'-fno-omit-frame-pointer',
|
"-fno-omit-frame-pointer",
|
||||||
'-fexceptions',
|
"-fexceptions",
|
||||||
'-Wall',
|
"-Wall",
|
||||||
'-Werror',
|
"-Werror",
|
||||||
'-O3',
|
"-O3",
|
||||||
'-ffast-math',
|
"-ffast-math",
|
||||||
]
|
]
|
||||||
|
|
||||||
LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
|
LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
|
||||||
'-fPIC',
|
"-fPIC",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def yoga_dep(dep):
|
def yoga_dep(dep):
|
||||||
return '//' + dep
|
return "//" + dep
|
||||||
|
|
||||||
|
|
||||||
def yoga_android_aar(*args, **kwargs):
|
def yoga_android_aar(*args, **kwargs):
|
||||||
native.android_aar(*args, **kwargs)
|
native.android_aar(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_android_binary(*args, **kwargs):
|
def yoga_android_binary(*args, **kwargs):
|
||||||
native.android_binary(*args, **kwargs)
|
native.android_binary(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_android_library(*args, **kwargs):
|
def yoga_android_library(*args, **kwargs):
|
||||||
native.android_library(*args, **kwargs)
|
native.android_library(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_android_resource(*args, **kwargs):
|
def yoga_android_resource(*args, **kwargs):
|
||||||
native.android_resource(*args, **kwargs)
|
native.android_resource(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_apple_library(*args, **kwargs):
|
def yoga_apple_library(*args, **kwargs):
|
||||||
native.apple_library(*args, **kwargs)
|
native.apple_library(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_apple_test(*args, **kwargs):
|
def yoga_apple_test(*args, **kwargs):
|
||||||
native.apple_test(*args, **kwargs)
|
native.apple_test(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_cxx_binary(*args, **kwargs):
|
def yoga_cxx_binary(*args, **kwargs):
|
||||||
kwargs.pop("platforms", None)
|
kwargs.pop("platforms", None)
|
||||||
native.cxx_binary(*args, **kwargs)
|
native.cxx_binary(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_cxx_library(*args, **kwargs):
|
def yoga_cxx_library(*args, **kwargs):
|
||||||
# Currently unused
|
# Currently unused
|
||||||
kwargs.pop("platforms", None)
|
kwargs.pop("platforms", None)
|
||||||
native.cxx_library(*args, **kwargs)
|
native.cxx_library(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_cxx_test(*args, **kwargs):
|
def yoga_cxx_test(*args, **kwargs):
|
||||||
native.cxx_test(*args, **kwargs)
|
native.cxx_test(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_java_binary(*args, **kwargs):
|
def yoga_java_binary(*args, **kwargs):
|
||||||
native.java_binary(*args, **kwargs)
|
native.java_binary(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_java_library(*args, **kwargs):
|
def yoga_java_library(*args, **kwargs):
|
||||||
native.java_library(*args, **kwargs)
|
native.java_library(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_java_test(*args, **kwargs):
|
def yoga_java_test(*args, **kwargs):
|
||||||
native.java_test(*args, **kwargs)
|
native.java_test(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_prebuilt_cxx_library(*args, **kwargs):
|
def yoga_prebuilt_cxx_library(*args, **kwargs):
|
||||||
native.prebuilt_cxx_library(*args, **kwargs)
|
native.prebuilt_cxx_library(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def yoga_prebuilt_jar(*args, **kwargs):
|
def yoga_prebuilt_jar(*args, **kwargs):
|
||||||
native.prebuilt_jar(*args, **kwargs)
|
native.prebuilt_jar(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def is_apple_platform():
|
def is_apple_platform():
|
||||||
return True
|
return True
|
||||||
|
Reference in New Issue
Block a user