New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Swift Package Manager support (Fixes #7047) #7052
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// swift-tools-version:4.1 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Protobuf", | ||
products: [ | ||
// Products define the executables and libraries produced by a package, and make them visible to other packages. | ||
.library(name: "Protobuf", targets: ["Protobuf"]), | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
// .package(url: /* package url */, from: "1.0.0"), | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
// Targets can depend on other targets in this package, and on products in packages which this package depends on. | ||
.target( | ||
name: "Protobuf", | ||
dependencies: [], | ||
path: "objectivec/", | ||
exclude: ["ProtocolBuffers_OSX.xcodeproj", "ProtocolBuffers_iOS.xcodeproj", "ProtocolBuffers_tvOS.xcodeproj", "DevTools/", "Tests/", ".gitignore", "README.md", "generate_well_known_types.sh"], | ||
sources: ["google/protobuf/"], | ||
publicHeadersPath: "objectivec/"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, how do we test things to be sure things are working? We're also seeing some issue with CocoaPods around case sensitive/case insensitive file systems (#6803) and how it handles the path names. So if we are looking to add SwiftPM support, it would be nice to sure things are working for all setups. |
||
] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does
path
,exclude
, andsources
all work together? There are sources needed that don't live under thatsources
reference. I don't suppose there's any way to use globs to help cut down on what has to be explicitly listed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomasvl unfortunately, no globbing. You can use more explicit
sources
, or explicitexclude
. For example: https://github.com/getsentry/sentry-cocoa/pull/352/files