-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for Swift package registries
- Loading branch information
1 parent
89048bd
commit 3b08998
Showing
26 changed files
with
353 additions
and
8 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
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
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
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
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,8 @@ | ||
# Import Shared settings | ||
import %workspace%/../../shared.bazelrc | ||
|
||
# Import CI settings. | ||
import %workspace%/../../ci.bazelrc | ||
|
||
# Try to import a local.rc file; typically, written by CI | ||
try-import %workspace%/../../local.bazelrc |
12 changes: 12 additions & 0 deletions
12
examples/swift_package_registry_example/.swiftpm/configuration/registries.json
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,12 @@ | ||
{ | ||
"authentication" : { | ||
|
||
}, | ||
"registries" : { | ||
"[default]" : { | ||
"supportsAvailability" : false, | ||
"url" : "http://localhost:8000" | ||
} | ||
}, | ||
"version" : 1 | ||
} |
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,38 @@ | ||
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary") | ||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_binary") | ||
load("@cgrindel_bazel_starlib//bzltidy:defs.bzl", "tidy") | ||
|
||
tidy( | ||
name = "tidy", | ||
targets = [ | ||
":update_build_files", | ||
], | ||
) | ||
|
||
# MARK: - Gazelle | ||
|
||
# Ignore the Swift build folder | ||
# gazelle:exclude .build | ||
|
||
gazelle_binary( | ||
name = "gazelle_bin", | ||
languages = [ | ||
"@bazel_skylib_gazelle_plugin//bzl", | ||
"@rules_swift_package_manager//gazelle", | ||
], | ||
) | ||
|
||
gazelle( | ||
name = "update_build_files", | ||
gazelle = ":gazelle_bin", | ||
) | ||
|
||
swift_binary( | ||
name = "swift_package_registry_example", | ||
srcs = ["main.swift"], | ||
module_name = "swift_package_registry_example", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@swiftpkg_swift_collections//:Collections", | ||
], | ||
) |
Oops, something went wrong.