@@ -36,7 +36,7 @@ extension PackagePIFProjectBuilder {
36
36
precondition ( pluginModule. type == . plugin)
37
37
38
38
// Create an executable PIF target in order to get specialization.
39
- let pluginPifTargetKP = try self . project. addTarget { _ in
39
+ let pluginTargetKeyPath = try self . project. addTarget { _ in
40
40
ProjectModel . Target (
41
41
id: pluginModule. pifTargetGUID ( ) ,
42
42
productType: . executable,
@@ -45,8 +45,8 @@ extension PackagePIFProjectBuilder {
45
45
)
46
46
}
47
47
do {
48
- let pluginPifTarget = self . project [ keyPath: pluginPifTargetKP ]
49
- log ( . debug, " Created \( pluginPifTarget . productType) ' \( pluginPifTarget . id) ' with name ' \( pluginPifTarget . name) ' " )
48
+ let pluginTarget = self . project [ keyPath: pluginTargetKeyPath ]
49
+ log ( . debug, " Created \( pluginTarget . productType) ' \( pluginTarget . id) ' with name ' \( pluginTarget . name) ' " )
50
50
}
51
51
52
52
var buildSettings : ProjectModel . BuildSettings = self . package . underlying. packageBaseBuildSettings
@@ -71,7 +71,7 @@ extension PackagePIFProjectBuilder {
71
71
. productRepresentingDependencyOfBuildPlugin ( in: moduleProducts)
72
72
73
73
if let productDependency {
74
- self . project [ keyPath: pluginPifTargetKP ] . common. addDependency (
74
+ self . project [ keyPath: pluginTargetKeyPath ] . common. addDependency (
75
75
on: productDependency. pifTargetGUID ( ) ,
76
76
platformFilters: dependencyPlatformFilters
77
77
)
@@ -86,7 +86,7 @@ extension PackagePIFProjectBuilder {
86
86
87
87
case . library, . systemModule, . test, . binary, . plugin, . macro:
88
88
let dependencyGUID = moduleDependency. pifTargetGUID ( )
89
- self . project [ keyPath: pluginPifTargetKP ] . common. addDependency (
89
+ self . project [ keyPath: pluginTargetKeyPath ] . common. addDependency (
90
90
on: dependencyGUID,
91
91
platformFilters: dependencyPlatformFilters
92
92
)
@@ -107,7 +107,7 @@ extension PackagePIFProjectBuilder {
107
107
let dependencyPlatformFilters = packageConditions
108
108
. toPlatformFilter ( toolsVersion: self . package . manifest. toolsVersion)
109
109
110
- self . project [ keyPath: pluginPifTargetKP ] . common. addDependency (
110
+ self . project [ keyPath: pluginTargetKeyPath ] . common. addDependency (
111
111
on: dependencyGUID,
112
112
platformFilters: dependencyPlatformFilters
113
113
)
@@ -119,18 +119,18 @@ extension PackagePIFProjectBuilder {
119
119
// Any dependencies of plugin targets need to be built for the host.
120
120
buildSettings [ . SUPPORTED_PLATFORMS] = [ " $(HOST_PLATFORM) " ]
121
121
122
- self . project [ keyPath: pluginPifTargetKP ] . common. addBuildConfig { id in
122
+ self . project [ keyPath: pluginTargetKeyPath ] . common. addBuildConfig { id in
123
123
BuildConfig ( id: id, name: " Debug " , settings: buildSettings)
124
124
}
125
- self . project [ keyPath: pluginPifTargetKP ] . common. addBuildConfig { id in
125
+ self . project [ keyPath: pluginTargetKeyPath ] . common. addBuildConfig { id in
126
126
BuildConfig ( id: id, name: " Release " , settings: buildSettings)
127
127
}
128
128
129
129
let pluginModuleMetadata = PackagePIFBuilder . ModuleOrProduct (
130
130
type: . plugin,
131
131
name: pluginModule. name,
132
132
moduleName: pluginModule. name,
133
- pifTarget: . target( self . project [ keyPath: pluginPifTargetKP ] ) ,
133
+ pifTarget: . target( self . project [ keyPath: pluginTargetKeyPath ] ) ,
134
134
indexableFileURLs: [ ] ,
135
135
headerFiles: [ ] ,
136
136
linkedPackageBinaries: [ ] ,
@@ -281,10 +281,10 @@ extension PackagePIFProjectBuilder {
281
281
)
282
282
}
283
283
do {
284
- let sourceModulePifTarget = self . project [ keyPath: sourceModuleTargetKeyPath]
284
+ let sourceModuleTarget = self . project [ keyPath: sourceModuleTargetKeyPath]
285
285
log ( . debug,
286
- " Created \( sourceModulePifTarget . productType) ' \( sourceModulePifTarget . id) ' " +
287
- " with name ' \( sourceModulePifTarget . name) ' and product name ' \( sourceModulePifTarget . productName) ' "
286
+ " Created \( sourceModuleTarget . productType) ' \( sourceModuleTarget . id) ' " +
287
+ " with name ' \( sourceModuleTarget . name) ' and product name ' \( sourceModuleTarget . productName) ' "
288
288
)
289
289
}
290
290
@@ -322,14 +322,14 @@ extension PackagePIFProjectBuilder {
322
322
}
323
323
324
324
// Find the PIF target for the resource bundle, if any. Otherwise fall back to the module.
325
- let resourceBundlePifTargetKP = self . resourceBundleTargetKeyPath ( forModuleName: sourceModule. name) ?? sourceModuleTargetKeyPath
325
+ let resourceBundleTargetKeyPath = self . resourceBundleTargetKeyPath ( forModuleName: sourceModule. name) ?? sourceModuleTargetKeyPath
326
326
327
327
// Add build tool commands to the resource bundle target.
328
328
if desiredModuleType != . executable && desiredModuleType != . macro && addBuildToolPluginCommands {
329
329
addBuildToolCommands (
330
330
module: sourceModule,
331
331
sourceModuleTargetKeyPath: sourceModuleTargetKeyPath,
332
- resourceBundleTargetKeyPath: resourceBundlePifTargetKP ,
332
+ resourceBundleTargetKeyPath: resourceBundleTargetKeyPath ,
333
333
sourceFilePaths: generatedSourceFiles,
334
334
resourceFilePaths: generatedResourceFiles
335
335
)
0 commit comments