Skip to content

Commit

Permalink
feat: add swift bazel files
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgriffing committed Mar 12, 2024
1 parent 732a87f commit e0037ea
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ use_repo(rules_ts_ext, "npm_typescript")
# Lua (No Bazel support)

# Rust (See WORKSPACE)

# Swift

bazel_dep(name = "rules_swift", version = "1.16.0", repo_name = "build_bazel_rules_swift")
24 changes: 24 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,27 @@ maven_install(
load("@maven//:defs.bzl", "pinned_maven_install")

pinned_maven_install()

# Swift

# Maybe not needed since we can use the MODULE version of setup

# http_archive(
# name = "build_bazel_rules_swift",
# sha256 = "7aabe3bbef8d2e07c9ee07acb386f0a257bd2f76ea8e21005688b506dc8da67b",
# url = "https://github.com/bazelbuild/rules_swift/releases/download/1.16.0/rules_swift.1.16.0.tar.gz",
# )

# 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()
8 changes: 8 additions & 0 deletions clients/swift/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"DEVSENSE.composer-php-vscode",
"DEVSENSE.intelli-php-vscode",
"DEVSENSE.phptools-vscode",
"DEVSENSE.profiler-php-vscode"
]
}
1 change: 1 addition & 0 deletions clients/swift/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
26 changes: 26 additions & 0 deletions clients/swift/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library", "swift_test")

swift_library(
name = "vexilla_client_lib",
srcs = [
"Sources/Hashing.swift",
"Sources/Scheduling.swift",
"Sources/Types.swift",
"Sources/Utils.swift",
"Sources/VexillaClient.swift",
],
tags = [],
)

swift_test(
name = "vexilla_client_test",
srcs = [
"Tests/LinuxMain.swift",
"Tests/VexillaClientTests/HashingTests.swift",
"Tests/VexillaClientTests/SchedulingTests.swift",
"Tests/VexillaClientTests/VexillaClientTests.swift",
"Tests/VexillaClientTests/XCTestManifests.swift",
],
target_compatible_with = ["@platforms//os:macos"],
deps = [":vexilla_client_lib"],
)

0 comments on commit e0037ea

Please sign in to comment.