@@ -21,10 +21,10 @@ struct CuckooPluginFile: BuildToolPlugin {
2121 . filter { $0. type == . source }
2222
2323 return try commands (
24- sources: sources. map ( \. path ) ,
24+ sources: sources. map ( \. url ) ,
2525 executableFactory: context. tool ( named: ) ,
26- projectDir: context. package . directory ,
27- derivedSourcesDir: context. pluginWorkDirectory
26+ projectDir: context. package . directoryURL ,
27+ derivedSourcesDir: context. pluginWorkDirectoryURL
2828 )
2929 }
3030}
@@ -52,35 +52,36 @@ extension CuckooPluginFile: XcodeBuildToolPlugin {
5252 }
5353
5454 return try commands (
55- sources: sources. map ( \. path ) ,
55+ sources: sources. map ( \. url ) ,
5656 executableFactory: context. tool ( named: ) ,
57- projectDir: context. xcodeProject. directory ,
58- derivedSourcesDir: context. pluginWorkDirectory
57+ projectDir: context. xcodeProject. directoryURL ,
58+ derivedSourcesDir: context. pluginWorkDirectoryURL
5959 )
6060 }
6161}
6262#endif
6363
6464func commands(
65- sources: [ Path ] ,
65+ sources: [ URL ] ,
6666 executableFactory: ( String ) throws -> PluginContext . Tool ,
67- projectDir: Path ,
68- derivedSourcesDir: Path
67+ projectDir: URL ,
68+ derivedSourcesDir: URL
6969) throws -> [ Command ] {
70- let configurationPath = projectDir. appending ( " Cuckoofile.toml " )
71- let output = derivedSourcesDir. appending ( " GeneratedMocks.swift " )
70+ let configurationURL = projectDir. appending ( path: " Cuckoofile.toml " )
71+ let outputURL = derivedSourcesDir. appending ( component: " GeneratedMocks.swift " )
72+
7273 return [
7374 . buildCommand(
7475 displayName: " Run Cuckoonator (single file) " ,
75- executable: try executableFactory ( " CuckooGenerator " ) . path ,
76+ executable: try executableFactory ( " CuckooGenerator " ) . url ,
7677 arguments: [ ] ,
7778 environment: [
78- " PROJECT_DIR " : projectDir,
79- " DERIVED_SOURCES_DIR " : derivedSourcesDir,
80- " CUCKOO_OVERRIDE_OUTPUT " : output ,
79+ " PROJECT_DIR " : projectDir. path ( ) ,
80+ " DERIVED_SOURCES_DIR " : derivedSourcesDir. path ( ) ,
81+ " CUCKOO_OVERRIDE_OUTPUT " : outputURL . path ( ) ,
8182 ] ,
82- inputFiles: [ configurationPath ] + sources,
83- outputFiles: [ output ]
83+ inputFiles: [ configurationURL ] + sources,
84+ outputFiles: [ outputURL ]
8485 )
8586 ]
8687}
0 commit comments