-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
59 lines (51 loc) · 1.99 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import Foundation
import PackageDescription
let commonDependencies: [PackageDescription.Package.Dependency] = [
.package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "1.4.0")),
.package(url: "https://github.com/apple/swift-openapi-runtime", .upToNextMinor(from: "1.6.0")),
.package(url: "https://github.com/apple/swift-openapi-urlsession", .upToNextMinor(from: "1.0.2")),
.package(url: "https://github.com/hmlongco/Factory.git", .upToNextMajor(from: "2.1.3")),
]
let remoteDependencies: [PackageDescription.Package.Dependency] = commonDependencies + [
.package(url: "https://github.com/oversizedev/OversizeModels.git", .upToNextMajor(from: "0.1.0")),
]
let localDependencies: [PackageDescription.Package.Dependency] = commonDependencies + [
.package(name: "OversizeModels", path: "../OversizeModels"),
]
var dependencies: [PackageDescription.Package.Dependency] = remoteDependencies
if ProcessInfo.processInfo.environment["BUILD_MODE"] == "DEV" {
dependencies = localDependencies
}
let package = Package(
name: "OversizeNetwork",
platforms: [
.macOS(.v12),
.iOS(.v15),
.tvOS(.v15),
.watchOS(.v9),
],
products: [
.library(
name: "OversizeNetwork",
targets: ["OversizeNetwork"]
),
],
dependencies: dependencies,
targets: [
.target(
name: "OversizeNetwork",
dependencies: [
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
.product(name: "Factory", package: "Factory"),
.product(name: "OversizeModels", package: "OversizeModels"),
] /* ,
plugins: [
.openAPIGenerator,
]
*/
),
]
)