Skip to content

Commit

Permalink
chore: add example of SWIFT_PACKAGE defines
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Sep 26, 2024
1 parent 76b88dc commit 8dff9fb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
2 changes: 2 additions & 0 deletions examples/interesting_deps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ swift_binary(
"@swiftpkg_libwebp_xcode//:libwebp",
"@swiftpkg_opencombine//:OpenCombine",
"@swiftpkg_swift_log//:Logging",
"@swiftpkg_swift_package_defines_example//:Foo",
"@swiftpkg_swift_package_defines_example//:FooSwift",
],
)

Expand Down
1 change: 1 addition & 0 deletions examples/interesting_deps/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ use_repo(
"swiftpkg_libwebp_xcode",
"swiftpkg_opencombine",
"swiftpkg_swift_log",
"swiftpkg_swift_package_defines_example",
)
17 changes: 13 additions & 4 deletions examples/interesting_deps/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/GEOSwift/GEOSwift",
"state" : {
"revision" : "2d23ede8c82c067655d3a9f0221bc73f08cd399a",
"version" : "10.1.0"
"revision" : "1fee0146ee06ca2d1e83070320b95526f3690f9d",
"version" : "10.2.0"
}
},
{
Expand All @@ -50,8 +50,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log",
"state" : {
"revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5",
"version" : "1.5.4"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-package-defines-example",
"kind" : "remoteSourceControl",
"location" : "https://github.com/luispadron/swift-package-defines-example",
"state" : {
"revision" : "58e32880dc2b5e1ac677a7e8dcf5b9f8e874b260",
"version" : "1.0.0"
}
}
],
Expand Down
1 change: 1 addition & 0 deletions examples/interesting_deps/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ let package = Package(
.package(url: "https://github.com/OpenCombine/OpenCombine", from: "0.14.0"),
.package(url: "https://github.com/SDWebImage/libwebp-Xcode.git", from: "1.3.2"),
.package(url: "https://github.com/apple/swift-log", from: "1.6.1"),
.package(url: "https://github.com/luispadron/swift-package-defines-example", from: "1.0.0"),
]
)
8 changes: 8 additions & 0 deletions examples/interesting_deps/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import CocoaLumberjack
import CocoaLumberjackSwiftLogBackend
import Foo
import FooSwift
import GEOSwift
import libwebp
import Logging
Expand All @@ -14,3 +16,9 @@ logger.info("Hello World!")

let webpVersion = WebPGetDecoderVersion()
logger.info("WebP version: \(webpVersion)")

let fooObjc = foo()
logger.info("fooObjc: \(fooObjc)")

let fooSwift = fooSwift()
logger.info("fooSwift: \(fooSwift)")

0 comments on commit 8dff9fb

Please sign in to comment.