// swift-tools-version: 6.2 import PackageDescription import Foundation // rastrillo/native at main bb989a7, with Base's additions (Task 1): // OficinaIDModel.assertion(for:), OficinaApp.base and NativeConnection's // ://open. OFICINA_NATIVE_PACKAGE_PATH points at a local checkout instead, // for work on the kit itself. let sharedNative: Package.Dependency = ProcessInfo.processInfo.environment["OFICINA_NATIVE_PACKAGE_PATH"].map { .package(name: "native", path: $0) } ?? .package(url: "https://amadan.net/rastrillo/native", revision: "bb989a7cf3bdb152e1529f6e514d24f249f777ec") let package = Package( name: "BaseNative", defaultLocalization: "en", platforms: [.macOS(.v26), .iOS(.v26)], products: [ .library(name: "BaseKit", targets: ["BaseKit"]), .executable(name: "BaseMac", targets: ["BaseMac"]), ], dependencies: [ sharedNative, // Equipo's pin (00d09aa7): the chat's Markdown is Equipo's parser. .package(url: "https://github.com/swiftlang/swift-cmark", revision: "08ddb528923cc1a6527e02b7a1aee9e516ca749a"), // The Mac's shortcut for Ask Base (P11), 3.1.0. MIT; in the Colophon. .package(url: "https://github.com/sindresorhus/KeyboardShortcuts", revision: "772133d9dbe800fdac0473226822994c5c162c58"), ], targets: [ // The look, the API client, Ask and Home, for both apps. Fonts/ is // filled by scripts/fonts-into-bundle.sh before any build. .target(name: "BaseKit", dependencies: [.product(name: "cmark-gfm", package: "swift-cmark"), .product(name: "RastrilloApple", package: "native")], resources: [.process("Resources/Localizable.xcstrings"), .copy("Resources/Fonts"), .copy("Resources/Colophon.json")]), .executableTarget(name: "BaseMac", dependencies: ["BaseKit", .product(name: "RastrilloApple", package: "native"), .product(name: "RastrilloMacUpdates", package: "native", condition: .when(platforms: [.macOS])), .product(name: "KeyboardShortcuts", package: "KeyboardShortcuts", condition: .when(platforms: [.macOS]))], path: "Sources/BaseMac"), .testTarget(name: "BaseKitTests", dependencies: ["BaseKit", .product(name: "RastrilloApple", package: "native"), .product(name: "RastrilloTestSupport", package: "native")], resources: [.copy("Fixtures")]), // The screenshot gate's Mac half; scripts/snapshots.sh runs it, plain // `swift test` skips it. ios/project.yml builds the same files as // BasePhoneSnapshots for the iPhone half. .testTarget(name: "BaseSnapshots", dependencies: ["BaseKit", .product(name: "RastrilloSnapshots", package: "native"), .product(name: "RastrilloApple", package: "native"), .product(name: "RastrilloTestSupport", package: "native")], exclude: ["__Snapshots__"]), ] )