-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Added SPM support #1928
base: master
Are you sure you want to change the base?
Added SPM support #1928
Changes from all commits
69424b7
e6bec65
4cf93ea
749f39a
7432529
c31845d
62d2496
3cf5efe
1bd56fb
f7c13f7
ea9c697
e39434d
9ade381
4ef0cc7
4c483f8
6fd4065
094d983
f5f430c
8bacfd3
8ddb565
1c4074f
c480761
f06cc18
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 |
---|---|---|
|
@@ -24,3 +24,4 @@ jobs: | |
uses: actions/checkout@v2 | ||
- name: Run build script | ||
run: ./build.sh ${{ matrix.mode }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,8 @@ playground.xcworkspace | |
# Carthage | ||
Carthage/Checkouts | ||
Carthage/Build | ||
|
||
#SPM | ||
.swiftpm/ | ||
.build/ | ||
Package.resolved |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github "pinterest/PINRemoteImage" "3.0.0-beta.14" | ||
github "pinterest/PINCache" "3.0.1-beta.7" | ||
github "pinterest/PINRemoteImage" "3.0.1" | ||
github "pinterest/PINCache" "3.0.1" |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,77 @@ | ||||||
// swift-tools-version:5.3 | ||||||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||||||
|
||||||
import PackageDescription | ||||||
|
||||||
let headersSearchPath: [CSetting] = [.headerSearchPath("."), | ||||||
.headerSearchPath("Base"), | ||||||
.headerSearchPath("Debug"), | ||||||
.headerSearchPath("Details"), | ||||||
.headerSearchPath("Details/Transactions"), | ||||||
.headerSearchPath("Layout"), | ||||||
.headerSearchPath("Private"), | ||||||
.headerSearchPath("Private/Layout"), | ||||||
.headerSearchPath("TextExperiment/Component"), | ||||||
.headerSearchPath("TextExperiment/String"), | ||||||
.headerSearchPath("TextExperiment/Utility"), | ||||||
.headerSearchPath("TextKit"), | ||||||
.headerSearchPath("tvOS"),] | ||||||
|
||||||
let sharedDefines: [CSetting] = [ | ||||||
// Disable "old" textnode by default for SPM | ||||||
.define("AS_ENABLE_TEXTNODE", to: "0"), | ||||||
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. Why is this disabled? 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. Thanks for mention that, I guess the main reason was - I need that to be a default since 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.
Suggested change
This option leads 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. This option makes usage of ASTextNode2 a default. So in your code, you should reference it just like |
||||||
|
||||||
// PINRemoteImage always available for Texture | ||||||
.define("AS_PIN_REMOTE_IMAGE", to: "1"), | ||||||
|
||||||
// always disabled | ||||||
.define("IG_LIST_COLLECTION_VIEW", to: "0"),] | ||||||
|
||||||
func IGListKit(enabled: Bool) -> [CSetting] { | ||||||
let state: String = enabled ? "1" : "0" | ||||||
return [ | ||||||
.define("AS_IG_LIST_KIT", to: state), | ||||||
.define("AS_IG_LIST_DIFF_KIT", to: state), | ||||||
] | ||||||
} | ||||||
|
||||||
|
||||||
let package = Package( | ||||||
name: "Texture", | ||||||
platforms: [ | ||||||
.macOS(.v10_15), | ||||||
.iOS(.v10), | ||||||
.tvOS(.v10) | ||||||
], | ||||||
products: [ | ||||||
// Products define the executables and libraries a package produces, and make them visible to other packages. | ||||||
.library( | ||||||
name: "AsyncDisplayKit", | ||||||
type: .static, | ||||||
targets: ["AsyncDisplayKit"]), | ||||||
.library( | ||||||
name: "AsyncDisplayKitIGListKit", | ||||||
type: .static, | ||||||
targets: ["AsyncDisplayKitIGListKit"]), | ||||||
], | ||||||
dependencies: [ | ||||||
.package(url: "https://github.com/pinterest/PINRemoteImage.git", .branch("master")), | ||||||
.package(url: "https://github.com/3a4oT/IGListKit", .branch("spmNumber10")), | ||||||
], | ||||||
targets: [ | ||||||
.target( | ||||||
name: "AsyncDisplayKit", | ||||||
dependencies: ["PINRemoteImage"], | ||||||
path: "spm/Sources/AsyncDisplayKit", | ||||||
cSettings: headersSearchPath + sharedDefines + IGListKit(enabled: false) | ||||||
), | ||||||
.target( | ||||||
name: "AsyncDisplayKitIGListKit", | ||||||
dependencies: ["IGListKit", "PINRemoteImage"], | ||||||
path: "spm/Sources/AsyncDisplayKitIGListKit/AsyncDisplayKit", | ||||||
cSettings: headersSearchPath + sharedDefines + IGListKit(enabled: true) | ||||||
), | ||||||
], | ||||||
cLanguageStandard: .c11, | ||||||
cxxLanguageStandard: .cxx11 | ||||||
) |
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.
PINRemoteImage needs to be updated to point to master (or atleast wait for next release), to include PINRemoteImage bugfixes related to SPM. And this should also transitively updated PINCache and PINOperation