-
Notifications
You must be signed in to change notification settings - Fork 49
/
BUILD
63 lines (57 loc) · 1.58 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
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
# This is needed for implicit entitlement rules created for
# files.
package(default_visibility = ["//visibility:public"])
ios_application(
name = "ios-app",
bundle_id = "com.Sample",
families = ["iphone"],
infoplists = ["Info.plist"],
minimum_os_version = "9.0",
visibility = ["//visibility:public"],
deps = [":ios-app-main"],
)
swift_library(
name = "ios-app-main",
srcs = [
"AppDelegate.swift",
],
deps = [":tailor"],
)
swift_library(
name = "tailor",
srcs = [
"Tailor.swift",
],
copts = [
"-swift-version 4.2",
],
# TODO: Add the ability to customize a module name.
# This works, but not in Xcode!
module_name = "tailor",
)
# This is basically the same Xcode project as the Xcode project rule
load(
"@xchammer//:BazelExtensions/xchammerconfig.bzl",
"project_config",
)
load("@xchammer//:BazelExtensions/xcodeproject.bzl", "xcode_project")
xcode_project(
name = "XcodeBazel",
bazel = "tools/bazelwrapper",
project_config = project_config(
build_bazel_platform_options = {
"ios_x86_64": ["--config=ios_x86_64"],
"ios_i386": ["--config=ios_i386"],
"ios_arm64": ["--config=ios_arm64"],
"ios_armv7": ["--config=ios_armv7"],
},
generate_transitive_xcode_targets = True,
generate_xcode_schemes = True,
paths = ["**"],
),
targets = [
"//:ios-app",
],
)