| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // swift-tools-version: 5.9
- // The swift-tools-version declares the minimum version of Swift required to build this package.
- import PackageDescription
- import CompilerPluginSupport
- import Foundation
- let package = Package(
- name: "AutoCodable",
- platforms: [
- .macOS(.v10_15),
- .iOS(.v12)
- ],
- products: [
- // Products define the executables and libraries a package produces, making them visible to other packages.
- .library(
- name: "AutoCodable",
- targets: ["AutoCodable"]),
- ],
- dependencies: [
- .package(
- url: "https://github.com/apple/swift-syntax.git",
- from: "509.0.0"
- ),
- ],
- targets: [
- // Targets are the basic building blocks of a package, defining a module or a test suite.
- // Targets can depend on other targets in this package and products from dependencies.
- .target(
- name: "AutoCodable",
- dependencies: ["AutoCodableMacro"]
- ),
- .macro(
- name: "AutoCodableMacro",
- dependencies: [
- .product(name: "SwiftSyntax", package: "swift-syntax"),
- .product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
- .product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
- ]
- ),
- .testTarget(
- name: "AutoCodableTests",
- dependencies: ["AutoCodable"]
- )
- ]
- )
|