-
Notifications
You must be signed in to change notification settings - Fork 18
[SPM] Support Swift Package Manager #29
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
base: refactor/combine
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ | |
| xcuserdata | ||
| *.xccheckout | ||
| Carthage/Build | ||
| .build | ||
| .swiftpm | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // swift-tools-version:5.5 | ||
| // The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "DataSource", | ||
| platforms: [ | ||
| .macOS(.v10_15), .iOS(.v13), .tvOS(.v13) | ||
| ], | ||
| products: [ | ||
| .library( | ||
| name: "DataSource", | ||
| targets: ["DataSource"] | ||
| ) | ||
| ], | ||
| targets: [ | ||
| .target( | ||
| name: "DataSource", | ||
| path: "DataSource", | ||
| exclude: ["Info.plist"], | ||
| linkerSettings: [ | ||
| .linkedFramework("Foundation"), | ||
| .linkedFramework("UIKit", BuildSettingCondition.when(platforms: [.iOS, .tvOS])), | ||
| .linkedFramework("AppKit", BuildSettingCondition.when(platforms: [.macOS])) | ||
|
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. I think we can omit the
Author
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. Yes, I don't even think the linkerSettings section is needed though. I'll try removing the section and see how that goes. 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. I think It's similar to using
Contributor
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. @hadiidbouk nope, the import are not transitive, we still need to |
||
| ] | ||
| ) | ||
| ] | ||
| ) | ||
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.
We are excluding the
Info.plistfile to avoid conflicts when adding this library to a project?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.
We need to exclude it otherwise the build system tries to compile the plist file, and fails.