import Foundation import LocalMath public enum PackageInfo { /// 由构建工具插件在编译前生成。 public static var generated: String { GeneratedInfo.value } /// 声明为 resource 的文件通过 `Bundle.module` 读取。 public static var resourceMessage: String { guard let url = Bundle.module.url(forResource: "message", withExtension: "txt"), let text = try? String(contentsOf: url, encoding: .utf8) else { return "missing" } return text.trimmingCharacters(in: .whitespacesAndNewlines) } /// 来自本地路径依赖的另一个包。 public static var doubled: Int { LocalMath.double(21) } public static let targets = ["Ch28Kit", "Ch28Support", "Ch28Demo"] }