-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for installing via Bazel (#103)
Adds support for installing via Bazel --------- Co-authored-by: Luis Padron <[email protected]>
- Loading branch information
1 parent
97e7454
commit 49477f8
Showing
7 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build --apple_platform_type=ios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,7 @@ Pods/ | |
# Swift Package Manager | ||
generated/ | ||
.build/ | ||
.swiftpm/ | ||
.swiftpm/ | ||
|
||
# Bazel | ||
bazel-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
load( | ||
"@build_bazel_rules_swift//swift:swift.bzl", | ||
"swift_library", | ||
"swift_test", | ||
) | ||
|
||
load( | ||
"@build_bazel_rules_apple//apple:ios.bzl", | ||
"ios_framework", | ||
"ios_unit_test", | ||
) | ||
|
||
swift_library( | ||
name = "Paralayout.lib", | ||
module_name = "Paralayout", | ||
srcs = glob(["Paralayout/**/*.swift"]), | ||
deps = [], | ||
) | ||
|
||
swift_library( | ||
name = "ParalayoutTests.lib", | ||
module_name = "ParalayoutTests", | ||
deps = [":Paralayout.lib"], | ||
srcs = glob(["ParalayoutTests/**/*.swift"]), | ||
testonly = True, | ||
) | ||
|
||
ios_framework( | ||
name = "Paralayout", | ||
deps = [":Paralayout.lib"], | ||
visibility = ["//visibility:public"], | ||
bundle_id = "com.squareup.Paralayout", | ||
infoplists = ["Paralayout/Info.plist"], | ||
minimum_os_version = "12.0", | ||
families = ["iphone", "ipad"], | ||
) | ||
|
||
ios_unit_test( | ||
name = "ParalayoutTests", | ||
deps = [":ParalayoutTests.lib"], | ||
bundle_name = "ParalayoutTests", | ||
minimum_os_version = "12.0", | ||
runner = "@build_bazel_rules_apple//apple/testing/default_runner:ios_xctestrun_ordered_runner", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "build_bazel_rules_apple", | ||
sha256 = "8ac4c7997d863f3c4347ba996e831b5ec8f7af885ee8d4fe36f1c3c8f0092b2c", | ||
url = "https://github.com/bazelbuild/rules_apple/releases/download/2.5.0/rules_apple.2.5.0.tar.gz", | ||
) | ||
|
||
load( | ||
"@build_bazel_rules_apple//apple:repositories.bzl", | ||
"apple_rules_dependencies", | ||
) | ||
|
||
apple_rules_dependencies() | ||
|
||
load( | ||
"@build_bazel_rules_swift//swift:repositories.bzl", | ||
"swift_rules_dependencies", | ||
) | ||
|
||
swift_rules_dependencies() | ||
|
||
load( | ||
"@build_bazel_rules_swift//swift:extras.bzl", | ||
"swift_rules_extra_dependencies", | ||
) | ||
|
||
swift_rules_extra_dependencies() | ||
|
||
load( | ||
"@build_bazel_apple_support//lib:repositories.bzl", | ||
"apple_support_dependencies", | ||
) | ||
|
||
apple_support_dependencies() |