Skip to content

Instantly share code, notes, and snippets.

@shoumikhin

shoumikhin/BUCK Secret

Last active August 19, 2019 03:13
Show Gist options
  • Save shoumikhin/78ec8d06001963a6ec88bbc1bb7bf395 to your computer and use it in GitHub Desktop.
Save shoumikhin/78ec8d06001963a6ec88bbc1bb7bf395 to your computer and use it in GitHub Desktop.
PROJECT_VERSION = '1.2.8'
OBJC_COPTS = [
"-fobjc-arc",
"-Werror",
"-Wextra",
"-Wall",
"-Wstrict-prototypes",
"-Wdocumentation",
]
SWIFT_VERSION = "5"
apple_library(
name = "Promises",
srcs = glob([
"Sources/Promises/*.swift",
]),
modular = True,
module_name = "Promises",
swift_version = SWIFT_VERSION,
compiler_flags = [
"-enable-testing",
],
link_whole = True,
tests = [
":PromisesPerformanceTests",
":PromisesTests",
],
deps = [
":FBLPromises",
],
licenses = [
"LICENSE",
],
visibility = ["PUBLIC"],
)
apple_library(
name = "PromisesTestHelpers",
srcs = glob([
"Sources/PromisesTestHelpers/*.swift",
]),
modular = True,
module_name = "PromisesTestHelpers",
swift_version = SWIFT_VERSION,
compiler_flags = [],
link_whole = True,
deps = [
":Promises",
],
)
apple_library(
name = "FBLPromises",
srcs = glob([
"Sources/FBLPromises/*.m",
]),
headers = [
"Sources/FBLPromises/include/FBLPromisePrivate.h",
],
exported_headers = glob([
"Sources/FBLPromises/include/*.h",
]),
modular = True,
module_name = "FBLPromises",
compiler_flags = OBJC_COPTS,
preprocessor_flags = [
"-ISources/FBLPromises/include",
],
link_whole = True,
tests = [
":FBLPromisesPerformanceTests",
":FBLPromisesTests",
],
licenses = [
"LICENSE",
],
visibility = ["PUBLIC"],
)
apple_library(
name = "FBLPromisesTestHelpers",
srcs = glob([
"Sources/FBLPromisesTestHelpers/*.m",
]),
exported_headers = glob([
"Sources/FBLPromisesTestHelpers/include/*.h",
]),
modular = True,
module_name = "FBLPromisesTestHelpers",
compiler_flags = OBJC_COPTS,
preprocessor_flags = [
"-ISources/FBLPromises/include",
"-ISources/FBLPromisesTestHelpers/include",
],
link_whole = True,
deps = [
":FBLPromises",
],
)
apple_test(
name = "PromisesTests",
info_plist = "Promises.xcodeproj/PromisesTests_Info.plist",
info_plist_substitutions = {
'CURRENT_PROJECT_VERSION' : PROJECT_VERSION,
'PRODUCT_BUNDLE_IDENTIFIER' : 'PromisesTests',
},
srcs = glob([
"Tests/PromisesTests/*.swift",
]),
swift_version = SWIFT_VERSION,
compiler_flags = [],
deps = [
":PromisesTestHelpers",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework",
],
)
apple_test(
name = "PromisesPerformanceTests",
info_plist = "Promises.xcodeproj/PromisesPerformanceTests_Info.plist",
info_plist_substitutions = {
'CURRENT_PROJECT_VERSION' : PROJECT_VERSION,
'PRODUCT_BUNDLE_IDENTIFIER' : 'PromisesPerformanceTests',
},
srcs = glob([
"Tests/PromisesPerformanceTests/*.swift",
]),
swift_version = SWIFT_VERSION,
compiler_flags = [],
deps = [
":FBLPromisesTestHelpers",
":PromisesTestHelpers",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework",
],
)
apple_test(
name = "FBLPromisesTests",
info_plist = "Promises.xcodeproj/FBLPromisesTests_Info.plist",
info_plist_substitutions = {
'CURRENT_PROJECT_VERSION' : PROJECT_VERSION,
'PRODUCT_BUNDLE_IDENTIFIER' : 'FBLPromisesTests',
},
srcs = glob([
"Tests/FBLPromisesTests/*.m",
]),
compiler_flags = OBJC_COPTS,
deps = [
":FBLPromisesTestHelpers",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework",
],
)
apple_test(
name = "FBLPromisesPerformanceTests",
info_plist = "Promises.xcodeproj/FBLPromisesPerformanceTests_Info.plist",
info_plist_substitutions = {
'CURRENT_PROJECT_VERSION' : PROJECT_VERSION,
'PRODUCT_BUNDLE_IDENTIFIER' : 'FBLPromisesPerformanceTests',
},
srcs = glob([
"Tests/FBLPromisesPerformanceTests/*.m",
]),
compiler_flags = OBJC_COPTS,
deps = [
":FBLPromisesTestHelpers",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework",
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment