forked from envoyproxy/envoy-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
138 lines (123 loc) · 3.63 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
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
134
135
136
137
138
load("@build_bazel_rules_android//android:rules.bzl", "aar_import")
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import")
load("@io_bazel_rules_kotlin//kotlin/internal:toolchains.bzl", "define_kt_toolchain")
load(
"@com_github_buildbuddy_io_rules_xcodeproj//xcodeproj:experimental.bzl",
"device_and_simulator",
)
load("@com_github_buildbuddy_io_rules_xcodeproj//xcodeproj:xcodeproj.bzl", "xcodeproj")
load("//bazel:framework_imports_extractor.bzl", "framework_imports_extractor")
licenses(["notice"]) # Apache 2
alias(
name = "ios_xcframework",
actual = "//library/swift:Envoy",
visibility = ["//visibility:public"],
)
alias(
name = "ios_dist",
actual = "//library/swift:ios_framework",
)
framework_imports_extractor(
name = "framework_imports",
framework = "//library/swift:ios_framework",
)
apple_static_framework_import(
name = "envoy_mobile_ios",
framework_imports = [":framework_imports"],
sdk_dylibs = [
"resolv.9",
"c++",
],
sdk_frameworks = [
"Network",
"SystemConfiguration",
"UIKit",
],
visibility = ["//visibility:public"],
)
alias(
name = "android_aar",
actual = "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar",
visibility = ["//visibility:public"],
)
aar_import(
name = "envoy_mobile_android",
aar = "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar",
visibility = ["//visibility:public"],
)
alias(
name = "android_dist",
actual = "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar_with_artifacts",
)
define_kt_toolchain(
name = "kotlin_toolchain",
jvm_target = "1.8",
)
filegroup(
name = "kotlin_lint_config",
srcs = [".kotlinlint.yml"],
visibility = ["//visibility:public"],
)
filegroup(
name = "editor_config",
srcs = [".editorconfig"],
visibility = ["//visibility:public"],
)
genrule(
name = "kotlin_format",
srcs = ["//:editor_config"],
outs = ["kotlin_format.txt"],
cmd = """
$(location @kotlin_formatter//file) --android "**/*.kt" \
--reporter=plain --reporter=checkstyle,output=$@ \
--editorconfig=$(location //:editor_config)
""",
tools = ["@kotlin_formatter//file"],
)
genrule(
name = "kotlin_format_fix",
srcs = ["//:editor_config"],
outs = ["kotlin_format_fix.txt"],
cmd = """
$(location @kotlin_formatter//file) -F --android "**/*.kt" \
--reporter=plain --reporter=checkstyle,output=$@ \
--editorconfig=$(location //:editor_config)
""",
tools = ["@kotlin_formatter//file"],
)
device_and_simulator(
name = "ios_examples",
tags = ["manual"],
targets = [
# TODO(jpsim): Fix Objective-C app support
# "//examples/objective-c/hello_world:app",
"//examples/swift/async_await:app",
"//examples/swift/hello_world:app",
"//test/swift/apps/baseline:app",
"//test/swift/apps/experimental:app",
],
visibility = ["//visibility:public"],
)
xcodeproj(
name = "xcodeproj",
archived_bundles_allowed = True,
bazel_path = "./bazelw",
build_mode = "bazel",
project_name = "Envoy",
tags = ["manual"],
targets = [
# Libraries
"//library/swift:ios_lib",
"//library/objective-c:envoy_engine_objc_lib",
"//library/common:envoy_main_interface_lib",
# Apps
"//:ios_examples",
# Tests
"//experimental/swift:quic_stream_test",
"//test/objective-c:envoy_bridge_utility_test",
"//test/swift/integration:flatbuffer_test",
"//test/swift/integration:test",
"//test/swift/stats:test",
"//test/swift:test",
],
)