forked from CocoaPods/pod-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUCK
56 lines (51 loc) · 1.51 KB
/
BUCK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
load("//Config:buck_rule_macros.bzl", "apple_test_lib", "apple_third_party_lib", "apple_create_bundle_resource")
load("//Config:app_configs.bzl", "PREBUILT_FRAMEWORKS", "MODULE_TEST")
apple_third_party_lib(
name = "${POD_NAME}",
srcs = glob([
"${POD_NAME}/**/*.swift",
"${POD_NAME}/**/*.m",
]),
exported_headers = glob([
"${POD_NAME}/**/*.h"
]),
deps = [
":${POD_NAME}ResourceBundle",
"//Modules/TVLFoundation:TVLFoundation",
"//Modules/TVLUI:TVLUI",
"//Modules/TVLKit:TVLKit",
"//Modules/TVLStorage:TVLStorage",
"//Modules/TVLNetwork:TVLNetwork",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
]
)
apple_test_lib(
name = "${POD_NAME}Tests",
srcs = glob([
"Tests/**/*.m",
"Tests/**/*.swift"
]),
preprocessor_flags = [
"-I$(location //Modules/${POD_NAME}:${POD_NAME}#iphonesimulator-x86_64,private-headers)"
],
deps = [
# All Deps
":${POD_NAME}",
] + MODULE_TEST + PREBUILT_FRAMEWORKS
)
# Resources
apple_create_bundle_resource(
rule_name = "${POD_NAME}ResourceBundle",
bundle_resource_name = "${POD_NAME}Resources",
info_plist = '${POD_NAME}Resources/Info.plist',
image_xcassets_dirs = [
"${POD_NAME}Resources/Images.xcassets"
],
resource_dirs = glob([
"${POD_NAME}Resources/**/*.xib",
"${POD_NAME}/**/*.xib"
]),
)