fix: add TIFoundationUtils dependency to TIMoyaNetworking module

This commit is contained in:
Ivan Smolin 2022-04-01 15:15:09 +03:00
parent fa5fffc593
commit ab4faa2868
5 changed files with 11 additions and 3 deletions

View File

@ -47,7 +47,7 @@ let package = Package(
// MARK: - Networking
.target(name: "TINetworking", dependencies: ["TISwiftUtils", "Alamofire"], path: "TINetworking/Sources"),
.target(name: "TIMoyaNetworking", dependencies: ["TINetworking", "Moya"], path: "TIMoyaNetworking"),
.target(name: "TIMoyaNetworking", dependencies: ["TINetworking", "TIFoundationUtils", "Moya"], path: "TIMoyaNetworking"),
// MARK: - Elements

View File

@ -21,8 +21,9 @@
//
import Moya
import TIFoundationUtils
open class BaseCancellable: Cancellable {
open class BaseCancellable: Cancellable, CancellableTask {
private(set) public var isCancelled = false
open func cancel() {

View File

@ -22,6 +22,7 @@
import Moya
import TISwiftUtils
import TIFoundationUtils
public struct Cancellables {
public static func nonCancellable() -> Cancellable {
@ -31,4 +32,8 @@ public struct Cancellables {
public static func scoped(scopeCancellableClosure: ScopeCancellable.ScopeCancellableClosure) -> Cancellable {
ScopeCancellable(scopeCancellableClosure: scopeCancellableClosure)
}
public static func nonCancellableTask() -> CancellableTask {
NonCancellable()
}
}

View File

@ -21,8 +21,9 @@
//
import Moya
import TIFoundationUtils
public struct NonCancellable: Cancellable {
public struct NonCancellable: Cancellable, CancellableTask {
public let isCancelled = true
public init() {}

View File

@ -13,6 +13,7 @@ Pod::Spec.new do |s|
s.source_files = s.name + '/**/Sources/**/*'
s.dependency 'TINetworking', s.version.to_s
s.dependency 'TIFoundationUtils', s.version.to_s
s.dependency 'Moya', "~> 15.0"
end