forked from mac-cain13/R.swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CallInformation.swift
106 lines (89 loc) · 2.45 KB
/
CallInformation.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
106
//
// CallInformation.swift
// R.swift
//
// Created by Tom Lokhorst on 2017-04-22.
// From: https://github.com/mac-cain13/R.swift
// License: MIT License
//
import Foundation
import XcodeEdit
public struct CallInformation {
let outputURL: URL
let uiTestOutputURL: URL?
let rswiftIgnoreURL: URL
let generators: [Generator]
let accessLevel: AccessLevel
let imports: [Module]
let xcodeprojURL: URL
let targetName: String
let bundleIdentifier: String
let productModuleName: String
let infoPlistFile: URL
let codeSignEntitlements: URL?
let scriptInputFiles: [String]
let scriptOutputFiles: [String]
let lastRunURL: URL
let buildProductsDirURL: URL
let developerDirURL: URL
let sourceRootURL: URL
let sdkRootURL: URL
let platformURL: URL
public init(
outputURL: URL,
uiTestOutputURL: URL?,
rswiftIgnoreURL: URL,
generators: [Generator],
accessLevel: AccessLevel,
imports: [Module],
xcodeprojURL: URL,
targetName: String,
bundleIdentifier: String,
productModuleName: String,
infoPlistFile: URL,
codeSignEntitlements: URL?,
scriptInputFiles: [String],
scriptOutputFiles: [String],
lastRunURL: URL,
buildProductsDirURL: URL,
developerDirURL: URL,
sourceRootURL: URL,
sdkRootURL: URL,
platformURL: URL
) {
self.outputURL = outputURL
self.uiTestOutputURL = uiTestOutputURL
self.rswiftIgnoreURL = rswiftIgnoreURL
self.accessLevel = accessLevel
self.imports = imports
self.generators = generators
self.xcodeprojURL = xcodeprojURL
self.targetName = targetName
self.bundleIdentifier = bundleIdentifier
self.productModuleName = productModuleName
self.infoPlistFile = infoPlistFile
self.codeSignEntitlements = codeSignEntitlements
self.scriptInputFiles = scriptInputFiles
self.scriptOutputFiles = scriptOutputFiles
self.lastRunURL = lastRunURL
self.buildProductsDirURL = buildProductsDirURL
self.developerDirURL = developerDirURL
self.sourceRootURL = sourceRootURL
self.sdkRootURL = sdkRootURL
self.platformURL = platformURL
}
func urlForSourceTreeFolder(_ sourceTreeFolder: SourceTreeFolder) -> URL {
switch sourceTreeFolder {
case .buildProductsDir:
return buildProductsDirURL
case .developerDir:
return developerDirURL
case .sdkRoot:
return sdkRootURL
case .sourceRoot:
return sourceRootURL
case .platformDir:
return platformURL
}
}
}