Skip to content

Commit

Permalink
Update Package.swift to support Nuke version 11 ..< 13 (#3)
Browse files Browse the repository at this point in the history
* Update Package.swift to support Nuke version < 13.0.0

* Fix build test target failure
  • Loading branch information
Wei18 committed Aug 14, 2024
1 parent 337bb62 commit e6e9786
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Nuke_AVIF_PluginTests/AVIFImageDecoderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class AVIFImageDecoderTests: XCTestCase {
let exception = XCTestExpectation(description: "decode avif image")
Nuke.DataLoader.sharedUrlCache.removeAllCachedResponses()
AVIFImageDecoder.enable()
Nuke.ImagePipeline.shared.loadImage(with: self.avifImageURL, progress: nil) { (result) in
let request = ImageRequest(url: self.avifImageURL)
Nuke.ImagePipeline.shared.loadImage(with: request, progress: nil) { (result) in
switch result {
case .success(let imageResponse):
XCTAssertNotNil(imageResponse.image)
Expand All @@ -59,7 +60,7 @@ class AVIFImageDecoderTests: XCTestCase {
exception.fulfill()
}

self.wait(for: [exception], timeout: 1)
self.wait(for: [exception], timeout: 2)
}

}
7 changes: 4 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "0c52c84849acb64c0549eb830befcc5b1c522f7597beb1563daae20c0285de0d",
"pins" : [
{
"identity" : "libaom-xcode",
Expand Down Expand Up @@ -32,10 +33,10 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/kean/Nuke.git",
"state" : {
"revision" : "93c8dc78fbc0aa3538a0db460eb389d4180af242",
"version" : "11.3.1"
"revision" : "0ead44350d2737db384908569c012fe67c421e4d",
"version" : "12.8.0"
}
}
],
"version" : 2
"version" : 3
}
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:5.10
import PackageDescription

let package = Package(
Expand All @@ -11,7 +11,7 @@ let package = Package(
.library(name: "NukeAVIFPlugin", targets: ["NukeAVIFPlugin"]),
],
dependencies: [
.package(url: "https://github.com/kean/Nuke.git", from: "11.0.0"),
.package(url: "https://github.com/kean/Nuke.git", "11.0.0"..<"13.0.0"),
.package(url: "https://github.com/SDWebImage/libavif-Xcode.git", exact: "0.10.1")
],
targets: [
Expand Down

0 comments on commit e6e9786

Please sign in to comment.