Package.swift 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // swift-tools-version: 5.9
  2. // The swift-tools-version declares the minimum version of Swift required to build this package.
  3. import PackageDescription
  4. import CompilerPluginSupport
  5. import Foundation
  6. let package = Package(
  7. name: "AutoCodable",
  8. platforms: [
  9. .macOS(.v10_15),
  10. .iOS(.v12)
  11. ],
  12. products: [
  13. // Products define the executables and libraries a package produces, making them visible to other packages.
  14. .library(
  15. name: "AutoCodable",
  16. targets: ["AutoCodable"]),
  17. ],
  18. dependencies: [
  19. .package(
  20. url: "https://github.com/apple/swift-syntax.git",
  21. from: "509.0.0"
  22. ),
  23. ],
  24. targets: [
  25. // Targets are the basic building blocks of a package, defining a module or a test suite.
  26. // Targets can depend on other targets in this package and products from dependencies.
  27. .target(
  28. name: "AutoCodable",
  29. dependencies: ["AutoCodableMacro"]
  30. ),
  31. .macro(
  32. name: "AutoCodableMacro",
  33. dependencies: [
  34. .product(name: "SwiftSyntax", package: "swift-syntax"),
  35. .product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
  36. .product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
  37. ]
  38. ),
  39. .testTarget(
  40. name: "AutoCodableTests",
  41. dependencies: ["AutoCodable"]
  42. )
  43. ]
  44. )