Skip to content

Commit 7023e47

Browse files
committed
Use SwiftPM's builtin resource rules to copy spec files
1 parent cb1c2dd commit 7023e47

File tree

109 files changed

+95
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+95
-234
lines changed

Package.swift

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ let package = Package(
126126
"SWBLLBuild",
127127
],
128128
exclude: ["CMakeLists.txt"],
129-
swiftSettings: swiftSettings(languageMode: .v5),
130-
plugins: [
131-
.plugin(name: "SWBSpecificationsPlugin")
132-
]),
129+
resources: [.process("Specs")],
130+
swiftSettings: swiftSettings(languageMode: .v5)),
133131
.target(
134132
name: "SWBCSupport",
135133
publicHeadersPath: ".",
@@ -212,47 +210,45 @@ let package = Package(
212210
name: "SWBAndroidPlatform",
213211
dependencies: ["SWBCore", "SWBMacro", "SWBUtil"],
214212
exclude: ["CMakeLists.txt"],
213+
resources: [.process("Specs")],
215214
swiftSettings: swiftSettings(languageMode: .v6)),
216215
.target(
217216
name: "SWBApplePlatform",
218217
dependencies: ["SWBCore", "SWBMacro", "SWBUtil", "SWBTaskConstruction"],
219218
exclude: ["CMakeLists.txt"],
219+
resources: [.process("Specs")],
220220
swiftSettings: swiftSettings(languageMode: .v6)),
221221
.target(
222222
name: "SWBGenericUnixPlatform",
223223
dependencies: ["SWBCore", "SWBUtil"],
224224
exclude: ["CMakeLists.txt"],
225+
resources: [.process("Specs")],
225226
swiftSettings: swiftSettings(languageMode: .v6)),
226227
.target(
227228
name: "SWBQNXPlatform",
228229
dependencies: ["SWBCore", "SWBMacro", "SWBUtil"],
229230
exclude: ["CMakeLists.txt"],
231+
resources: [.process("Specs")],
230232
swiftSettings: swiftSettings(languageMode: .v6)),
231233
.target(
232234
name: "SWBUniversalPlatform",
233235
dependencies: ["SWBCore", "SWBMacro", "SWBUtil"],
234236
exclude: ["CMakeLists.txt"],
237+
resources: [.process("Specs")],
235238
swiftSettings: swiftSettings(languageMode: .v6)),
236239
.target(
237240
name: "SWBWebAssemblyPlatform",
238241
dependencies: ["SWBCore", "SWBMacro", "SWBUtil"],
239242
exclude: ["CMakeLists.txt"],
243+
resources: [.process("Specs")],
240244
swiftSettings: swiftSettings(languageMode: .v6)),
241245
.target(
242246
name: "SWBWindowsPlatform",
243247
dependencies: ["SWBCore", "SWBMacro", "SWBUtil"],
244248
exclude: ["CMakeLists.txt"],
249+
resources: [.process("Specs")],
245250
swiftSettings: swiftSettings(languageMode: .v6)),
246251

247-
// Helper targets for SwiftPM
248-
.executableTarget(
249-
name: "SWBSpecificationsCompiler",
250-
swiftSettings: swiftSettings(languageMode: .v6)),
251-
.plugin(
252-
name: "SWBSpecificationsPlugin",
253-
capability: .buildTool(),
254-
dependencies: ["SWBSpecificationsCompiler"]),
255-
256252
// Test support
257253
.target(
258254
name: "SwiftBuildTestSupport",
@@ -422,12 +418,6 @@ for target in package.targets {
422418
if ["SWBBuildService", "SWBTestSupport"].contains(target.name) {
423419
target.dependencies += pluginTargetNames.map { .target(name: $0) }
424420
}
425-
426-
if pluginTargetNames.contains(target.name) {
427-
target.plugins = (target.plugins ?? []) + [
428-
.plugin(name: "SWBSpecificationsPlugin")
429-
]
430-
}
431421
}
432422

433423
// `SWIFTCI_USE_LOCAL_DEPS` configures if dependencies are locally available to build

Plugins/SWBSpecificationsPlugin/SWBSpecificationsPlugin.swift

Lines changed: 0 additions & 57 deletions
This file was deleted.

Sources/SWBApplePlatform/CMakeLists.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@ file(CONFIGURE
2929
ESCAPE_QUOTES @ONLY NEWLINE_STYLE LF)
3030

3131
add_library(SWBApplePlatform STATIC
32-
Specs/AssetCatalogCompiler.swift
33-
Specs/CopyTiffFile.swift
34-
Specs/CoreDataCompiler.swift
35-
Specs/CoreMLCompiler.swift
36-
Specs/DittoTool.swift
37-
Specs/ExtensionPointsCompiler.swift
38-
Specs/IIGCompiler.swift
39-
Specs/InstrumentsPackageBuilderSpec.swift
40-
Specs/IntentsCompiler.swift
41-
Specs/InterfaceBuilderCompiler.swift
42-
Specs/InterfaceBuilderShared.swift
43-
Specs/MetalCompiler.swift
44-
Specs/MiGCompiler.swift
45-
Specs/OpenCLCompiler.swift
46-
Specs/RealityAssetsCompilerSpec.swift
47-
Specs/ReferenceObjectCompiler.swift
48-
Specs/ResMergerLinkerSpec.swift
49-
Specs/SceneKitToolSpec.swift
50-
Specs/StoryboardLinker.swift
51-
Specs/XCStringsCompiler.swift
32+
AssetCatalogCompiler.swift
33+
CopyTiffFile.swift
34+
CoreDataCompiler.swift
35+
CoreMLCompiler.swift
36+
DittoTool.swift
37+
ExtensionPointsCompiler.swift
38+
IIGCompiler.swift
39+
InstrumentsPackageBuilderSpec.swift
40+
IntentsCompiler.swift
41+
InterfaceBuilderCompiler.swift
42+
InterfaceBuilderShared.swift
43+
MetalCompiler.swift
44+
MiGCompiler.swift
45+
OpenCLCompiler.swift
46+
RealityAssetsCompilerSpec.swift
47+
ReferenceObjectCompiler.swift
48+
ResMergerLinkerSpec.swift
49+
SceneKitToolSpec.swift
50+
StoryboardLinker.swift
51+
XCStringsCompiler.swift
5252
ActoolInputFileGroupingStrategy.swift
5353
AssetCatalogCompilerOutputParser.swift
5454
CMakeLists.txt

0 commit comments

Comments
 (0)