passepartout-apple/PassepartoutLibrary/Package.swift

140 lines
4.7 KiB
Swift
Raw Normal View History

2023-12-16 19:58:54 +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(
2022-06-23 21:31:01 +00:00
name: "PassepartoutLibrary",
platforms: [
2023-12-16 19:58:54 +00:00
.iOS(.v15),
.macOS(.v12),
.tvOS(.v17)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
2022-06-23 21:31:01 +00:00
name: "PassepartoutLibrary",
targets: ["PassepartoutLibrary"]),
.library(
name: "PassepartoutInterfaces",
targets: [
"PassepartoutCore",
"PassepartoutFrontend",
"PassepartoutProviders",
"PassepartoutServices"
]),
.library(
2022-04-12 13:09:14 +00:00
name: "OpenVPNAppExtension",
targets: ["OpenVPNAppExtension"]),
.library(
name: "WireGuardAppExtension",
targets: ["WireGuardAppExtension"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
// .package(url: "https://github.com/passepartoutvpn/tunnelkit", from: "6.3.2"),
2024-01-14 13:34:21 +00:00
.package(url: "https://github.com/passepartoutvpn/tunnelkit", revision: "6ab1759e048867fbca9bd5d33f2dc7eb1fa79ca6"),
2022-04-12 13:25:38 +00:00
// .package(name: "TunnelKit", path: "../../tunnelkit"),
2022-04-12 13:09:14 +00:00
.package(url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
2023-05-24 16:19:47 +00:00
// MARK: Implementations
.target(
2022-06-23 21:31:01 +00:00
name: "PassepartoutLibrary",
dependencies: [
"PassepartoutFrontend",
2023-05-24 16:19:47 +00:00
"PassepartoutVPNImpl",
"PassepartoutProvidersImpl",
2022-06-23 21:31:01 +00:00
]),
.target(
2023-05-24 16:19:47 +00:00
name: "PassepartoutVPNImpl",
dependencies: [
2023-05-24 16:19:47 +00:00
"PassepartoutVPN",
"SwiftyBeaver",
2022-06-23 21:31:01 +00:00
.product(name: "TunnelKitLZO", package: "TunnelKit")
],
resources: [
2023-05-24 16:19:47 +00:00
.process("Data/Profiles.xcdatamodeld")
2022-06-23 21:31:01 +00:00
]),
.target(
2023-05-24 16:19:47 +00:00
name: "PassepartoutProvidersImpl",
2022-06-23 21:31:01 +00:00
dependencies: [
2023-05-24 16:19:47 +00:00
"PassepartoutProviders",
2022-06-23 21:31:01 +00:00
"PassepartoutServices"
],
resources: [
2023-05-24 16:19:47 +00:00
.copy("API"),
.process("Data/Providers.xcdatamodeld")
2022-06-23 21:31:01 +00:00
]),
2023-05-24 16:19:47 +00:00
// MARK: Interfaces
2022-06-23 21:31:01 +00:00
.target(
2023-05-24 16:19:47 +00:00
name: "PassepartoutVPN",
2022-06-23 21:31:01 +00:00
dependencies: [
2023-05-24 16:19:47 +00:00
"PassepartoutProviders",
.product(name: "TunnelKit", package: "TunnelKit"),
2023-07-02 10:51:50 +00:00
.product(name: "TunnelKitOpenVPN", package: "TunnelKit"),
.product(name: "TunnelKitWireGuard", package: "TunnelKit"),
2023-05-24 16:19:47 +00:00
]),
.target(
name: "PassepartoutFrontend",
dependencies: [
"PassepartoutProviders"
]),
2023-05-24 16:19:47 +00:00
.target(
name: "PassepartoutProviders",
dependencies: [
"PassepartoutCore"
2022-04-12 13:09:14 +00:00
]),
.target(
name: "PassepartoutServices",
2022-06-23 21:31:01 +00:00
dependencies: [
2023-05-24 16:19:47 +00:00
"PassepartoutCore"
]),
.target(
2023-05-24 16:19:47 +00:00
name: "PassepartoutCore",
2022-04-12 13:09:14 +00:00
dependencies: [
.product(name: "GenericJSON", package: "generic-json-swift")
2022-04-12 13:09:14 +00:00
]),
2023-05-24 16:19:47 +00:00
// MARK: App extensions
2022-04-12 13:09:14 +00:00
.target(
name: "OpenVPNAppExtension",
dependencies: [
.product(name: "TunnelKitOpenVPNAppExtension", package: "TunnelKit"),
.product(name: "TunnelKitLZO", package: "TunnelKit")
]),
2022-04-12 13:09:14 +00:00
.target(
name: "WireGuardAppExtension",
dependencies: [
.product(name: "TunnelKitWireGuardAppExtension", package: "TunnelKit")
]),
2023-05-24 16:19:47 +00:00
// MARK: Tests
2022-10-30 10:53:53 +00:00
.testTarget(
name: "PassepartoutCoreTests",
2023-05-24 16:19:47 +00:00
dependencies: ["PassepartoutCore"],
resources: [
.process("Resources")
]),
.testTarget(
name: "PassepartoutFrontendTests",
dependencies: ["PassepartoutFrontend"]),
.testTarget(
name: "PassepartoutProvidersTests",
dependencies: ["PassepartoutProviders"]),
.testTarget(
name: "PassepartoutServicesTests",
dependencies: ["PassepartoutServices"])
]
)