From eee1e016b517e7f447d71281efcec7a9480b34fc Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 12 Jul 2024 20:22:57 -0400 Subject: [PATCH] Add Package.swift --- Package.swift | 46 +++++++--------------------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/Package.swift b/Package.swift index 027d1c01..80186894 100644 --- a/Package.swift +++ b/Package.swift @@ -1,50 +1,18 @@ -// swift-tools-version: 5.9 +// swift-tools-version: 5.10 import PackageDescription let package = Package( name: "WordPressKit", - platforms: [.iOS(.v13)], + platforms: [.iOS(.v15)], products: [ - .library(name: "APIInterface", targets: ["APIInterface"]), - .library(name: "CoreAPI", targets: ["CoreAPI"]), - ], - dependencies: [ - // .package(url: "https://github.com/wordpress-mobile/WordPress-iOS-Shared.git", from: "2.3.1"), - // See https://github.com/wordpress-mobile/WordPress-iOS-Shared/pull/354 - .package(url: "https://github.com/wordpress-mobile/WordPress-iOS-Shared.git", branch: "mokagio/swiftlint-read-as-dependency"), - .package(url: "https://github.com/wordpress-mobile/wpxmlrpc", from: "0.10.0"), - // Test dependencies - .package(url: "https://github.com/AliSoftware/OHHTTPStubs", from: "9.1.0"), - .package(url: "https://github.com/Alamofire/Alamofire", from: "5.8.1"), + .library(name: "WordPressKit", targets: ["WordPressKit"]), ], targets: [ - .target(name: "APIInterface"), - .target( - name: "CoreAPI", - dependencies: [ - .target(name: "APIInterface"), - .product( - name: "WordPressShared", - package: "WordPress-iOS-Shared", - // Constrain to iOS only to avoid having to explicitly set a macOS version because of this library's requirements. - condition: .when(platforms: [.iOS]) - ), - "wpxmlrpc" - ] - ), - .testTarget( - name: "CoreAPITests", - dependencies: [ - .target(name: "CoreAPI"), - .product(name: "OHHTTPStubs", package: "OHHTTPStubs"), - .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs"), - "Alamofire", - ], - path: "Tests/CoreAPITests", - resources: [ - .process("Stubs") // Relative to path - ] + .binaryTarget( + name: "WordPressKit", + url: "https://github.com/user-attachments/files/16200320/WordPressKit.zip", + checksum: "fa2ddc1fedcc225beb23d23168043bd78bbd12d43e187cc0dd772aef8d81ee20" ), ] )