Skip to content

Commit

Permalink
Add Package.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Jul 13, 2024
1 parent 01fe272 commit eee1e01
Showing 1 changed file with 7 additions and 39 deletions.
46 changes: 7 additions & 39 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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"
),
]
)

0 comments on commit eee1e01

Please sign in to comment.