| 1 | // swift-tools-version: 6.2 |
| 2 | import PackageDescription |
| 3 | import Foundation |
| 4 | |
| 5 | // rastrillo/native with grant-bound sign-in lifetime handling. OFICINA_NATIVE_PACKAGE_PATH |
| 6 | // points at a local checkout instead, for work on the kit itself. |
| 7 | let sharedNative: Package.Dependency = ProcessInfo.processInfo.environment["OFICINA_NATIVE_PACKAGE_PATH"].map { .package(name: "native", path: $0) } |
| 8 | ?? .package(url: "https://amadan.net/rastrillo/native", revision: "a18c32b3584ab5cadb8327f8f52a6186721f58dd") |
| 9 | |
| 10 | let package = Package( |
| 11 | name: "EquipoNative", |
| 12 | defaultLocalization: "en", |
| 13 | platforms: [.macOS(.v26), .iOS(.v26)], |
| 14 | products: [ |
| 15 | .library(name: "EquipoKit", targets: ["EquipoKit"]), |
| 16 | // The Live Activity's attributes and views, for the iPhone's widget |
| 17 | // extension: no dependencies, so the extension stays small. |
| 18 | .library(name: "EquipoActivity", targets: ["EquipoActivity"]), |
| 19 | .executable(name: "EquipoMac", targets: ["EquipoMac"]), |
| 20 | ], |
| 21 | dependencies: [.package(path: "../share"), sharedNative, .package(url: "https://github.com/swiftlang/swift-cmark", revision: "08ddb528923cc1a6527e02b7a1aee9e516ca749a")], |
| 22 | targets: [ |
| 23 | .target(name: "EquipoActivity", resources: [.process("Resources")]), |
| 24 | .target(name: "EquipoKit", |
| 25 | dependencies: [.product(name: "EquipoShareCore", package: "share"), "EquipoActivity", .product(name: "cmark-gfm", package: "swift-cmark"), |
| 26 | .product(name: "RastrilloApple", package: "native"), |
| 27 | .product(name: "RastrilloNative", package: "native")], |
| 28 | resources: [.process("Resources")]), |
| 29 | .executableTarget(name: "EquipoMac", |
| 30 | dependencies: ["EquipoKit", .product(name: "EquipoShareUI", package: "share"), |
| 31 | .product(name: "RastrilloApple", package: "native"), |
| 32 | .product(name: "RastrilloMacUpdates", package: "native", condition: .when(platforms: [.macOS]))], |
| 33 | path: "Sources/EquipoMac"), |
| 34 | .testTarget(name: "EquipoKitTests", |
| 35 | dependencies: ["EquipoKit", "EquipoActivity", .target(name: "EquipoMac", condition: .when(platforms: [.macOS])), .product(name: "RastrilloTestSupport", package: "native"), .product(name: "RastrilloNative", package: "native")], |
| 36 | resources: [.copy("Fixtures")]), |
| 37 | ] |
| 38 | ) |
| 39 | |