I have a plugin that generates a swift file on build via a plugin. In another target in the same package I would like to use that file as input. However I notice that the sourcefiles on the target do not include generated source files in the pluginWorkingDirectory?
Inside my plugin I have the following:
guard let chameleonTarget = try context.package.targets(named: ["Chameleon"]).first as? SwiftSourceModuleTarget else {
throw Error.chameleonTargetMissing
}
guard let commonTokenNamesSwiftFile = (chameleonTarget.sourceFiles.first { $0.path.lastComponent == "ThemeConfiguration.TokenName-generated.swift"}) else {
throw Error.commonTokenNamesSwiftFileMissing
}
Is what I'm asking for just not possible? Given build dependencies and all.