2023-03-19 07:41:51 +00:00
|
|
|
// swift-tools-version:5.5
|
2021-10-27 16:47:08 +00:00
|
|
|
// 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",
|
2021-10-27 16:47:08 +00:00
|
|
|
platforms: [
|
2023-03-19 07:41:51 +00:00
|
|
|
.iOS(.v15), .macOS(.v12)
|
2021-10-27 16:47:08 +00:00
|
|
|
],
|
|
|
|
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"]),
|
2021-10-27 16:47:08 +00:00
|
|
|
.library(
|
2022-04-12 13:09:14 +00:00
|
|
|
name: "OpenVPNAppExtension",
|
|
|
|
targets: ["OpenVPNAppExtension"]),
|
|
|
|
.library(
|
|
|
|
name: "WireGuardAppExtension",
|
|
|
|
targets: ["WireGuardAppExtension"])
|
2021-10-27 16:47:08 +00:00
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
// Dependencies declare other packages that this package depends on.
|
|
|
|
// .package(url: /* package url */, from: "1.0.0"),
|
2022-10-11 16:16:11 +00:00
|
|
|
// .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "5.0.0"),
|
2023-03-19 07:41:51 +00:00
|
|
|
.package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("7ce254be0293ba7e1eeda07a3701804de59f7490")),
|
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")
|
2021-10-27 16:47:08 +00:00
|
|
|
],
|
|
|
|
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.
|
|
|
|
.target(
|
2022-06-23 21:31:01 +00:00
|
|
|
name: "PassepartoutLibrary",
|
|
|
|
dependencies: [
|
|
|
|
"PassepartoutVPN"
|
|
|
|
]),
|
|
|
|
.target(
|
|
|
|
name: "PassepartoutVPN",
|
2021-10-27 16:47:08 +00:00
|
|
|
dependencies: [
|
2022-04-12 13:09:14 +00:00
|
|
|
"PassepartoutProfiles",
|
2022-06-23 21:31:01 +00:00
|
|
|
.product(name: "TunnelKitLZO", package: "TunnelKit")
|
2022-04-12 13:09:14 +00:00
|
|
|
]),
|
|
|
|
.target(
|
|
|
|
name: "PassepartoutProfiles",
|
|
|
|
dependencies: [
|
2022-06-23 21:31:01 +00:00
|
|
|
"PassepartoutProviders"
|
2023-03-19 07:41:51 +00:00
|
|
|
],
|
|
|
|
resources: [
|
|
|
|
.process("DataModels/Profiles.xcdatamodeld")
|
2022-06-23 21:31:01 +00:00
|
|
|
]),
|
|
|
|
.target(
|
|
|
|
name: "PassepartoutProviders",
|
|
|
|
dependencies: [
|
|
|
|
"PassepartoutCore",
|
|
|
|
"PassepartoutServices"
|
2023-03-19 07:41:51 +00:00
|
|
|
],
|
|
|
|
resources: [
|
|
|
|
.process("DataModels/Providers.xcdatamodeld")
|
2022-06-23 21:31:01 +00:00
|
|
|
]),
|
|
|
|
.target(
|
|
|
|
name: "PassepartoutCore",
|
|
|
|
dependencies: [
|
2021-11-06 20:50:31 +00:00
|
|
|
.product(name: "TunnelKit", package: "TunnelKit"),
|
2021-10-27 16:47:08 +00:00
|
|
|
.product(name: "TunnelKitOpenVPN", package: "TunnelKit"),
|
2022-04-12 13:09:14 +00:00
|
|
|
.product(name: "TunnelKitWireGuard", package: "TunnelKit"),
|
2022-06-23 21:31:01 +00:00
|
|
|
.product(name: "GenericJSON", package: "generic-json-swift")
|
2022-04-12 13:09:14 +00:00
|
|
|
]),
|
2022-06-23 21:31:01 +00:00
|
|
|
//
|
2022-04-12 13:09:14 +00:00
|
|
|
.target(
|
|
|
|
name: "PassepartoutServices",
|
2022-06-23 21:31:01 +00:00
|
|
|
dependencies: [
|
2023-03-17 20:55:47 +00:00
|
|
|
"PassepartoutUtils"
|
2022-06-23 21:31:01 +00:00
|
|
|
],
|
2021-10-27 16:47:08 +00:00
|
|
|
resources: [
|
|
|
|
.copy("API")
|
|
|
|
]),
|
|
|
|
.target(
|
2022-04-12 13:09:14 +00:00
|
|
|
name: "PassepartoutUtils",
|
|
|
|
dependencies: [
|
|
|
|
.product(name: "GenericJSON", package: "generic-json-swift"),
|
|
|
|
"SwiftyBeaver"
|
|
|
|
]),
|
2022-06-23 21:31:01 +00:00
|
|
|
//
|
2022-04-12 13:09:14 +00:00
|
|
|
.target(
|
|
|
|
name: "OpenVPNAppExtension",
|
2021-10-27 16:47:08 +00:00
|
|
|
dependencies: [
|
2021-11-06 20:50:31 +00:00
|
|
|
.product(name: "TunnelKitOpenVPNAppExtension", package: "TunnelKit"),
|
2021-10-27 16:47:08 +00:00
|
|
|
.product(name: "TunnelKitLZO", package: "TunnelKit")
|
|
|
|
]),
|
2022-04-12 13:09:14 +00:00
|
|
|
.target(
|
|
|
|
name: "WireGuardAppExtension",
|
|
|
|
dependencies: [
|
|
|
|
.product(name: "TunnelKitWireGuardAppExtension", package: "TunnelKit")
|
|
|
|
]),
|
2022-10-30 10:53:53 +00:00
|
|
|
.testTarget(
|
|
|
|
name: "PassepartoutLibraryTests",
|
|
|
|
dependencies: ["PassepartoutLibrary"]),
|
|
|
|
.testTarget(
|
|
|
|
name: "PassepartoutVPNTests",
|
|
|
|
dependencies: ["PassepartoutVPN"]),
|
|
|
|
.testTarget(
|
|
|
|
name: "PassepartoutProfilesTests",
|
|
|
|
dependencies: ["PassepartoutProfiles"]),
|
2022-04-12 13:09:14 +00:00
|
|
|
.testTarget(
|
|
|
|
name: "PassepartoutProvidersTests",
|
|
|
|
dependencies: ["PassepartoutProviders"]),
|
2022-10-30 10:53:53 +00:00
|
|
|
.testTarget(
|
|
|
|
name: "PassepartoutCoreTests",
|
|
|
|
dependencies: ["PassepartoutCore"]),
|
2022-04-12 13:09:14 +00:00
|
|
|
.testTarget(
|
|
|
|
name: "PassepartoutServicesTests",
|
|
|
|
dependencies: ["PassepartoutServices"]),
|
2021-10-27 16:47:08 +00:00
|
|
|
.testTarget(
|
2022-04-12 13:09:14 +00:00
|
|
|
name: "PassepartoutUtilsTests",
|
|
|
|
dependencies: ["PassepartoutUtils"],
|
2021-10-27 16:47:08 +00:00
|
|
|
resources: [
|
|
|
|
.process("Resources")
|
|
|
|
])
|
|
|
|
]
|
|
|
|
)
|