mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2024-12-24 18:32:36 +00:00
68df6066ba
- Centralize context initialization/refresh in platform-specific app delegates - Prevent multiple calls to .onApplicationActive() - Simplify local/remote profile fingerprint comparison - Revert to always replacing Core Data entities - The remote store somehow ended up having duplicates, which caused repeated imports of remote profiles due to randomly different fingerprints - Optimize reload of in-app receipt
160 lines
5.1 KiB
Swift
160 lines
5.1 KiB
Swift
// 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: "AppUI",
|
|
targets: ["AppUI"]
|
|
),
|
|
.library(
|
|
name: "AppUIMain",
|
|
targets: ["AppUIMain"]
|
|
),
|
|
.library(
|
|
name: "AppUITV",
|
|
targets: ["AppUITV"]
|
|
),
|
|
.library(
|
|
name: "CommonLibrary",
|
|
targets: ["CommonLibrary"]
|
|
),
|
|
.library(
|
|
name: "TunnelLibrary",
|
|
targets: ["CommonLibrary"]
|
|
),
|
|
.library(
|
|
name: "UILibrary",
|
|
targets: ["UILibrary"]
|
|
)
|
|
],
|
|
dependencies: [
|
|
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.9.0"),
|
|
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "e7bd9636ac31d6111b0bc7c171398e68eeb384b5"),
|
|
// .package(path: "../../../passepartoutkit-source"),
|
|
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", from: "0.9.1"),
|
|
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", revision: "031863a1cd683962a7dfe68e20b91fa820a1ecce"),
|
|
// .package(path: "../../../passepartoutkit-source-openvpn-openssl"),
|
|
.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"),
|
|
// .package(path: "../../../passepartoutkit-source-wireguard-go"),
|
|
.package(url: "https://github.com/Cocoanetics/Kvitto", from: "1.0.0")
|
|
],
|
|
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: []
|
|
),
|
|
.target(
|
|
name: "AppDataProfiles",
|
|
dependencies: [
|
|
"AppData",
|
|
"CommonLibrary"
|
|
],
|
|
resources: [
|
|
.process("Profiles.xcdatamodeld")
|
|
]
|
|
),
|
|
.target(
|
|
name: "AppDataProviders",
|
|
dependencies: [
|
|
"AppData",
|
|
"CommonLibrary"
|
|
],
|
|
resources: [
|
|
.process("Providers.xcdatamodeld")
|
|
]
|
|
),
|
|
.target(
|
|
name: "AppUI",
|
|
dependencies: [
|
|
.target(name: "AppUIMain", condition: .when(platforms: [.iOS, .macOS])),
|
|
.target(name: "AppUITV", condition: .when(platforms: [.tvOS]))
|
|
]
|
|
),
|
|
.target(
|
|
name: "AppUIMain",
|
|
dependencies: [
|
|
"LegacyV2",
|
|
"UILibrary"
|
|
],
|
|
resources: [
|
|
.process("Resources")
|
|
]
|
|
),
|
|
.target(
|
|
name: "AppUITV",
|
|
dependencies: ["UILibrary"]
|
|
),
|
|
.target(
|
|
name: "CommonAPI",
|
|
dependencies: ["CommonLibrary"],
|
|
resources: [
|
|
.copy("API")
|
|
]
|
|
),
|
|
.target(
|
|
name: "CommonLibrary",
|
|
dependencies: [
|
|
"CommonUtils",
|
|
.product(name: "PassepartoutKit", package: "passepartoutkit-source"),
|
|
.product(name: "PassepartoutOpenVPNOpenSSL", package: "passepartoutkit-source-openvpn-openssl"),
|
|
.product(name: "PassepartoutWireGuardGo", package: "passepartoutkit-source-wireguard-go")
|
|
],
|
|
resources: [
|
|
.process("Resources")
|
|
]
|
|
),
|
|
.target(
|
|
name: "CommonUtils",
|
|
dependencies: ["Kvitto"]
|
|
),
|
|
.target(
|
|
name: "LegacyV2",
|
|
dependencies: [
|
|
"CommonUtils",
|
|
.product(name: "PassepartoutKit", package: "passepartoutkit-source")
|
|
],
|
|
resources: [
|
|
.process("Profiles.xcdatamodeld")
|
|
]
|
|
),
|
|
.target(
|
|
name: "UILibrary",
|
|
dependencies: [
|
|
"AppDataProfiles",
|
|
"AppDataProviders",
|
|
"CommonAPI",
|
|
"CommonLibrary"
|
|
],
|
|
resources: [
|
|
.process("Resources")
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "AppUIMainTests",
|
|
dependencies: ["AppUIMain"]
|
|
),
|
|
.testTarget(
|
|
name: "CommonLibraryTests",
|
|
dependencies: ["CommonLibrary"]
|
|
),
|
|
.testTarget(
|
|
name: "UILibraryTests",
|
|
dependencies: ["UILibrary"]
|
|
)
|
|
]
|
|
)
|