forked from tuist/tuist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTarget.swift
105 lines (85 loc) · 3.48 KB
/
Target.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import Foundation
/// A target of a project.
public struct Target: Codable, Equatable {
/// The name of the target. Also, the product name if not specified with ``productName``.
public let name: String
/// The platform the target product is built for.
public let platform: Platform
/// The type of build product this target will output.
public let product: Product
/// The built product name. If nil, it will be equal to ``name``.
public let productName: String?
/// The product bundle identifier.
public let bundleId: String
/// The minimum deployment target your product will support.
public let deploymentTarget: DeploymentTarget?
/// The Info.plist representation.
public let infoPlist: InfoPlist?
/// The source files of the target.
/// Note: any playgrounds matched by the globs used in this property will be automatically added.
public let sources: SourceFilesList?
/// The resource files of target.
/// Note: localizable files, `*.lproj`, are supported.
public let resources: ResourceFileElements?
/// The build phase copy files actions for the target.
public let copyFiles: [CopyFilesAction]?
/// The headers for the target.
public let headers: Headers?
/// The entitlements file path for the target.
public let entitlements: Path?
/// The build phase scripts actions for the target.
public let scripts: [TargetScript]
/// The target's dependencies.
public let dependencies: [TargetDependency]
/// The target's settings.
public let settings: Settings?
/// The Core Data models.
public let coreDataModels: [CoreDataModel]
/// The environment variables. Used by autogenerated schemes for the target.
public let environment: [String: String]
/// The launch arguments. Used by autogenerated schemes for the target.
public let launchArguments: [LaunchArgument]
/// The additional files for the target. For project's additional files, see ``Project/additionalFiles``.
public let additionalFiles: [FileElement]
public init(
name: String,
platform: Platform,
product: Product,
productName: String? = nil,
bundleId: String,
deploymentTarget: DeploymentTarget? = nil,
infoPlist: InfoPlist? = .default,
sources: SourceFilesList? = nil,
resources: ResourceFileElements? = nil,
copyFiles: [CopyFilesAction]? = nil,
headers: Headers? = nil,
entitlements: Path? = nil,
scripts: [TargetScript] = [],
dependencies: [TargetDependency] = [],
settings: Settings? = nil,
coreDataModels: [CoreDataModel] = [],
environment: [String: String] = [:],
launchArguments: [LaunchArgument] = [],
additionalFiles: [FileElement] = []
) {
self.name = name
self.platform = platform
self.bundleId = bundleId
self.productName = productName
self.product = product
self.infoPlist = infoPlist
self.entitlements = entitlements
self.dependencies = dependencies
self.settings = settings
self.sources = sources
self.resources = resources
self.copyFiles = copyFiles
self.headers = headers
self.scripts = scripts
self.coreDataModels = coreDataModels
self.environment = environment
self.launchArguments = launchArguments
self.deploymentTarget = deploymentTarget
self.additionalFiles = additionalFiles
}
}