Skip to content

Commit

Permalink
Merge pull request #1 from num42/ios/feature/create_swift_package
Browse files Browse the repository at this point in the history
Ios/feature/create swift package
  • Loading branch information
Lutzifer authored Jan 12, 2024
2 parents 69786e2 + 96bb571 commit 2ca42d1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.swiftpm
/Package.resolved
34 changes: 16 additions & 18 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
)
],
dependencies: [
.package(path: "../MacroTester"),
.package(url: "[email protected]:num42/swift-macrotester.git", from: "1.0.0"),
// Depend on the Swift 5.9 release of SwiftSyntax
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
.package(
Expand All @@ -36,33 +36,31 @@ let package = Package(
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
]
// plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
],
plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
),

// Library that exposes a macro as part of its API, which is used in client programs.
.target(
name: "Changeable",
dependencies: ["ChangeableMacros"]
// plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
dependencies: ["ChangeableMacros"],
plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
),

// A client of the library, which is able to use the macro in its own code.
.executableTarget(
name: "ChangeableClient",
dependencies: ["Changeable"]
// plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
)

dependencies: ["Changeable"],
plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
),
// A test target used to develop the macro implementation.
// .testTarget(
// name: "ChangeableTests",
// dependencies: [
// "ChangeableMacros",
// .product(name: "MacroTester", package: "MacroTester"),
// .product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")
// ]
// plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
// )
.testTarget(
name: "ChangeableTests",
dependencies: ["ChangeableMacros",
.product(name: "MacroTester", package: "swift-macrotester"),
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")
],
plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]
)
]
)
2 changes: 1 addition & 1 deletion Tests/ChangeableTests/ChangeableTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ChangeableMacros
import MacroTester
import SwiftSyntaxMacros
import SwiftSyntaxMacrosTestSupport
import XCTest
import MacroTester

let testMacros: [String: Macro.Type] = [
"Changeable": ChangeableFunctionMacro.self
Expand Down

0 comments on commit 2ca42d1

Please sign in to comment.