-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathBUILD.bazel
More file actions
133 lines (119 loc) · 3.56 KB
/
BUILD.bazel
File metadata and controls
133 lines (119 loc) · 3.56 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_unit_test")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_test")
load("@rules_cc//cc:defs.bzl", "objc_library")
package(default_visibility = ["//visibility:public"])
core_hdrs_internal = glob(
["Sources/Core/**/*.h"],
exclude = ["Sources/Core/Public/**/*.h"],
)
objc_library(
name = "GTMSessionFetcherCore",
srcs = glob(["Sources/Core/**/*.m"]) + core_hdrs_internal,
hdrs = glob(["Sources/Core/Public/**/*.h"]),
enable_modules = True,
includes = [
"Sources/Core/Public",
"Sources/Core/Public/GTMSessionFetcher",
],
module_name = "GTMSessionFetcherCore",
sdk_frameworks = ["Foundation"],
)
objc_library(
name = "GTMSessionFetcherFull",
srcs = glob(["Sources/Full/**/*.m"]),
hdrs = glob(["Sources/Full/Public/**/*.h"]),
enable_modules = True,
includes = [
"Sources/Full/Public",
"Sources/Full/Public/GTMSessionFetcher",
],
module_name = "GTMSessionFetcherFull",
deps = [":GTMSessionFetcherCore"],
)
objc_library(
name = "GTMSessionFetcherLogView",
srcs = glob([
"Sources/LogView/**/*.m",
"Sources/LogView/**/*.h",
]),
hdrs = glob(["Sources/LogView/Public/**/*.h"]),
enable_modules = True,
includes = [
"Sources/LogView/Public",
"Sources/LogView/Public/GTMSessionFetcher",
],
module_name = "GTMSessionFetcherLogView",
sdk_frameworks = [
"WebKit",
"Security",
],
deps = [":GTMSessionFetcherCore"],
)
core_tests = glob(
[
"UnitTests/**/*.m",
"UnitTests/**/*.h",
],
exclude = ["GTMSessionFetcherUserAgentTest.m"],
)
objc_library(
name = "GTMSessionFetcherCoreTestsLib",
srcs = core_tests + core_hdrs_internal,
includes = [
"Sources/Core",
"UnitTests",
],
sdk_frameworks = [
"CFNetwork",
"Security",
],
deps = [
":GTMSessionFetcherCore",
":GTMSessionFetcherFull",
],
)
macos_unit_test(
name = "GTMSessionFetcherCoreTests",
minimum_os_version = "10.15",
deps = [":GTMSessionFetcherCoreTestsLib"],
)
ios_unit_test(
name = "GTMSessionFetcherCoreTests_iOS",
minimum_os_version = "15.0",
runner = "@build_bazel_rules_apple//apple/testing/default_runner:ios_xctestrun_ordered_runner",
deps = [":GTMSessionFetcherCoreTestsLib"],
)
objc_library(
name = "GTMSessionFetcherUserAgentTestsLib",
srcs = ["UnitTests/GTMSessionFetcherUserAgentTest.m"],
includes = ["UnitTests"],
sdk_frameworks = [
"Security",
],
deps = [":GTMSessionFetcherCore"],
)
macos_unit_test(
name = "GTMSessionFetcherUserAgentTests",
minimum_os_version = "10.15",
target_compatible_with = ["@platforms//os:osx"],
deps = [":GTMSessionFetcherUserAgentTestsLib"],
)
ios_unit_test(
name = "GTMSessionFetcherUserAgentTests_iOS",
minimum_os_version = "15.0",
runner = "@build_bazel_rules_apple//apple/testing/default_runner:ios_xctestrun_ordered_runner",
target_compatible_with = ["@platforms//os:ios"],
deps = [":GTMSessionFetcherUserAgentTestsLib"],
)
swift_test(
name = "GTMSessionFetcherSwiftTestsLib",
srcs = ["SwiftPMTests/SwiftImportTest/ImportTests.swift"],
deps = [
":GTMSessionFetcherCore",
":GTMSessionFetcherFull",
":GTMSessionFetcherLogView",
],
)
# ObjCImportTest is omitted from bazel build because it currently fails to build.
# See https://github.com/bazelbuild/rules_apple/issues/2690 for details.