forked from bazel-xcode/PodToBUILD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
84 lines (71 loc) · 2.16 KB
/
BUILD
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application", "macos_unit_test")
load("@rules_cc//cc:defs.bzl", "objc_library")
objc_library(
name = "ObjcSupport",
srcs = glob(["Sources/ObjcSupport/*.m"]),
hdrs = glob(["Sources/ObjcSupport/include/*"]),
includes = ["Sources/ObjcSupport/include"]
)
# PodToBUILD is a core library enabling Starlark code generation
swift_library(
name = "PodToBUILD",
srcs = glob(["Sources/PodToBUILD/*.swift"]),
deps = [":ObjcSupport", "@podtobuild-Yams//:Yams"],
copts = ["-swift-version", "5"],
)
# Compiler
macos_command_line_application(
name = "Compiler",
minimum_os_version = "10.13",
deps = [":CompilerLib"],
)
swift_library(
name = "CompilerLib",
srcs = glob(["Sources/Compiler/*.swift"]),
deps = [":PodToBUILD"],
copts = ["-swift-version", "5"],
)
# RepoTools
macos_command_line_application(
name = "RepoTools",
minimum_os_version = "10.13",
deps = [":RepoToolsLib"],
)
swift_library(
name = "RepoToolsLib",
srcs = glob(["Sources/RepoTools/*.swift"]),
deps = [":RepoToolsCore"],
copts = ["-swift-version", "5"],
)
swift_library(
name = "RepoToolsCore",
srcs = glob(["Sources/RepoToolsCore/*.swift"]),
deps = [":PodToBUILD"],
copts = ["-swift-version", "4"],
)
alias(name = "update_pods", actual = "//bin:update_pods")
# This tests RepoToolsCore and Starlark logic
swift_library(
name = "PodToBUILDTestsLib",
srcs = glob(["Tests/PodToBUILDTests/*.swift"]),
deps = [":RepoToolsCore", "@podtobuild-SwiftCheck//:SwiftCheck"],
data = glob(["Examples/**/*.podspec.json"])
)
macos_unit_test(
name = "PodToBUILDTests",
deps = [":PodToBUILDTestsLib"],
minimum_os_version = "10.13",
)
swift_library(
name = "BuildTestsLib",
srcs = glob(["Tests/BuildTests/*.swift"]),
deps = [":RepoToolsCore", "@podtobuild-SwiftCheck//:SwiftCheck"],
data = glob(["Examples/**/*.podspec.json"])
)
# This tests RepoToolsCore and Starlark logic
macos_unit_test(
name = "BuildTests",
deps = [":BuildTestsLib"],
minimum_os_version = "10.13",
)