passepartout-apple/Passepartout/Library/Package.swift

166 lines
5.2 KiB
Swift
Raw Normal View History

2024-09-23 13:02:26 +00:00
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Library",
defaultLocalization: "en",
platforms: [
.iOS(.v16),
.macOS(.v13),
.tvOS(.v17)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "AppLibrary",
targets: ["AppLibrary"]
),
.library(
name: "AppUI",
targets: ["AppUI"]
2024-09-23 13:02:26 +00:00
),
.library(
name: "AppUIMain",
targets: ["AppUIMain"]
),
.library(
name: "AppUITV",
targets: ["AppUITV"]
),
2024-09-23 13:02:26 +00:00
.library(
name: "TunnelLibrary",
targets: ["CommonLibrary"]
),
.library(
name: "UILibrary",
targets: ["UILibrary"]
2024-09-23 13:02:26 +00:00
)
],
dependencies: [
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.9.0"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "b32b63ab8e09883f965737bb6214dfb81e38283a"),
2024-10-04 00:43:18 +00:00
// .package(path: "../../../passepartoutkit-source"),
2024-10-12 13:49:17 +00:00
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", from: "0.9.1"),
2024-10-04 00:43:18 +00:00
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", revision: "031863a1cd683962a7dfe68e20b91fa820a1ecce"),
// .package(path: "../../../passepartoutkit-source-openvpn-openssl"),
2024-10-12 13:49:17 +00:00
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-wireguard-go", from: "0.9.1"),
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-wireguard-go", revision: "ea39fa396e98cfd2b9a235f0a801aaf03a37e30a"),
2024-10-04 00:43:18 +00:00
// .package(path: "../../../passepartoutkit-source-wireguard-go"),
.package(url: "https://github.com/Cocoanetics/Kvitto", from: "1.0.0")
2024-09-23 13:02:26 +00:00
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "AppData",
dependencies: []
2024-09-23 13:02:26 +00:00
),
.target(
name: "AppDataProfiles",
dependencies: [
"AppData",
"AppLibrary"
2024-09-23 13:02:26 +00:00
],
resources: [
.process("Profiles.xcdatamodeld")
]
),
.target(
name: "AppDataProviders",
dependencies: [
"AppData",
"AppLibrary"
],
resources: [
.process("Providers.xcdatamodeld")
]
),
2024-09-23 13:02:26 +00:00
.target(
name: "AppLibrary",
dependencies: [
"CommonLibrary",
"CommonUtils",
"Kvitto"
]
),
.target(
name: "AppUI",
2024-09-23 13:02:26 +00:00
dependencies: [
.target(name: "AppUIMain", condition: .when(platforms: [.iOS, .macOS])),
.target(name: "AppUITV", condition: .when(platforms: [.tvOS]))
2024-09-23 13:02:26 +00:00
]
),
.target(
name: "AppUIMain",
dependencies: [
"LegacyV2",
"UILibrary"
],
resources: [
.process("Resources")
]
),
.target(
name: "AppUITV",
dependencies: ["UILibrary"]
),
.target(
name: "CommonAPI",
dependencies: ["CommonLibrary"],
resources: [
.copy("API")
]
),
2024-09-23 13:02:26 +00:00
.target(
name: "CommonLibrary",
dependencies: [
2024-10-04 00:43:18 +00:00
.product(name: "PassepartoutKit", package: "passepartoutkit-source"),
.product(name: "PassepartoutOpenVPNOpenSSL", package: "passepartoutkit-source-openvpn-openssl"),
.product(name: "PassepartoutWireGuardGo", package: "passepartoutkit-source-wireguard-go")
2024-09-23 13:02:26 +00:00
],
resources: [
.process("Resources")
]
),
.target(
name: "CommonUtils"
),
.target(
name: "LegacyV2",
dependencies: [
"CommonUtils",
2024-10-04 00:43:18 +00:00
.product(name: "PassepartoutKit", package: "passepartoutkit-source")
],
resources: [
.process("Profiles.xcdatamodeld")
]
),
2024-09-23 13:02:26 +00:00
.target(
name: "UILibrary",
dependencies: [
"AppDataProfiles",
"AppDataProviders",
"AppLibrary",
"CommonAPI"
],
resources: [
.process("Resources")
]
2024-09-23 13:02:26 +00:00
),
.testTarget(
name: "AppLibraryTests",
dependencies: ["AppLibrary"]
),
.testTarget(
name: "AppUIMainTests",
dependencies: ["AppUIMain"]
),
.testTarget(
name: "UILibraryTests",
dependencies: ["UILibrary"]
2024-09-23 13:02:26 +00:00
)
]
)