Migrate yoga defs to Skylark syntax.

Summary: https://our.intern.facebook.com/intern/dex/buck/python-to-skylark/

Reviewed By: adamjernst

Differential Revision: D6411822

fbshipit-source-id: 2abe2c183d1b1a28349d0c7bd765754688ec4441
This commit is contained in:
Taras Tsugrii
2017-11-27 13:47:46 -08:00
committed by Facebook Github Bot
parent afaafb4126
commit dec1172f38
20 changed files with 21 additions and 24 deletions

2
BUCK
View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
include_defs("//yoga_defs.bzl")
GMOCK_OVERRIDE_FLAGS = [
# gmock does not mark mocked methods as override, ignore the warnings in tests

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
include_defs("//yoga_defs.bzl")
COMPILER_FLAGS = [
"-fobjc-arc",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET")
android_aar(
name = "android",

View File

@@ -4,7 +4,7 @@
# This source code is licensed under the license found in the
# LICENSE-examples file in the root directory of this source tree.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_RES_TARGET")
android_binary(
name = "sample",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "ANDROID_SUPPORT_TARGET", "SOLOADER_TARGET")
android_library(
name = "yoga",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "JSR_305_TARGET", "SOLOADER_TARGET")
android_library(
name = "android",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "yoga_dep")
cxx_binary(
name = "benchmark",

View File

@@ -6,7 +6,7 @@
# of patent rights can be found in the PATENTS file in the same directory.
load("@xplat//configurations/buck:default_platform_defs", "is_apple_platform")
load("//:YOGA_DEFS", "BASE_COMPILER_FLAGS", "yoga_dep", "cxx_library")
load("//:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "yoga_dep", "cxx_library")
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
include_defs("//yoga_defs.bzl")
cxx_library(
name = "jni",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
java_library(
name = "annotations",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
prebuilt_jar(
name = "android-support",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
android_prebuilt_aar(
name = "appcompat",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
include_defs("//yoga_defs.bzl")
prebuilt_cxx_library(
name = "ndklog",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "PROGRUARD_ANNOTATIONS_TARGET", "SOLOADER_TARGET", "JSR_305_TARGET")
java_library(
name = "jni",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
include_defs("//yoga_defs.bzl")
COMPILER_FLAGS = [
"-std=c++11",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
prebuilt_jar(
name = "infer-annotations-jar",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
prebuilt_jar(
name = "jsr305-jar",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
prebuilt_jar(
name = "junit-jar",

View File

@@ -5,7 +5,7 @@
# 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.
include_defs("//YOGA_DEFS")
load("//:yoga_defs.bzl", "YOGA_ROOTS")
android_prebuilt_aar(
name = "soloader",

View File

@@ -1,3 +1,4 @@
"""Provides macros for working with yoga library."""
YOGA_ROOTS = ['//...']
JAVA_TARGET = '//java:java'
@@ -38,10 +39,6 @@ LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
'-fPIC',
]
def yoga_dep(dep):
return '//' + dep
with allow_unsafe_import():
import os.path
def isdir(filename):
return os.path.isdir(filename)