|
| 1 | +// swift-tools-version:5.10 |
| 2 | +// The swift-tools-version declares the minimum version of Swift required to build this package. |
| 3 | + |
| 4 | +import PackageDescription |
| 5 | + |
| 6 | +let package = Package( |
| 7 | + name: "Benchmarks", |
| 8 | + platforms: [ |
| 9 | + .macOS(.v14) |
| 10 | + ], |
| 11 | + dependencies: [ |
| 12 | + .package(url: "https://github.com/ordo-one/package-benchmark", from: "1.27.0"), |
| 13 | + .package(url: "https://github.com/RandomHashTags/swift-htmlkit", from: "0.4.0"), |
| 14 | + .package(url: "https://github.com/sliemeobn/elementary", from: "0.3.4"), |
| 15 | + .package(url: "https://github.com/vapor-community/HTMLKit", from: "2.8.1"), |
| 16 | + .package(url: "https://github.com/pointfreeco/swift-html", from: "0.4.1"), |
| 17 | + //.package(name: "BBHTML", url: "https://github.com/BinaryBirds/swift-html", from: "1.7.0") |
| 18 | + ], |
| 19 | + targets: [ |
| 20 | + .target( |
| 21 | + name: "Utilities", |
| 22 | + path: "Benchmarks/Utilities" |
| 23 | + ), |
| 24 | + .target( |
| 25 | + name: "TestElementary", |
| 26 | + dependencies: [ |
| 27 | + "Utilities", |
| 28 | + .product(name: "Elementary", package: "Elementary"), |
| 29 | + ], |
| 30 | + path: "Benchmarks/Elementary" |
| 31 | + ), |
| 32 | + .target( |
| 33 | + name: "TestSwiftHTMLBB", |
| 34 | + dependencies: [ |
| 35 | + "Utilities", |
| 36 | + //.product(name: "SwiftHtml", package: "BBHTML") |
| 37 | + ], |
| 38 | + path: "Benchmarks/SwiftHTMLBB" |
| 39 | + ), |
| 40 | + .target( |
| 41 | + name: "TestSwiftHTMLKit", |
| 42 | + dependencies: [ |
| 43 | + "Utilities", |
| 44 | + .product(name: "HTMLKit", package: "swift-htmlkit", moduleAliases: ["HTMLKit" : "SwiftHTMLKit"]), |
| 45 | + .product(name: "HTMLKit", package: "HTMLKit", moduleAliases: ["HTMLKit" : "VaporHTMLKit"]) |
| 46 | + ], |
| 47 | + path: "Benchmarks/SwiftHTMLKit" |
| 48 | + ), |
| 49 | + .target( |
| 50 | + name: "TestSwiftHTMLPF", |
| 51 | + dependencies: [ |
| 52 | + "Utilities", |
| 53 | + .product(name: "Html", package: "swift-html"), |
| 54 | + ], |
| 55 | + path: "Benchmarks/SwiftHTMLPF" |
| 56 | + ), |
| 57 | + .target( |
| 58 | + name: "TestVaporHTMLKit", |
| 59 | + dependencies: [ |
| 60 | + "Utilities", |
| 61 | + .product(name: "HTMLKit", package: "swift-htmlkit", moduleAliases: ["HTMLKit" : "SwiftHTMLKit"]), |
| 62 | + .product(name: "HTMLKit", package: "HTMLKit", moduleAliases: ["HTMLKit" : "VaporHTMLKit"]) |
| 63 | + ], |
| 64 | + path: "Benchmarks/VaporHTMLKit" |
| 65 | + ), |
| 66 | + |
| 67 | + .executableTarget( |
| 68 | + name: "Benchmarks", |
| 69 | + dependencies: [ |
| 70 | + "TestElementary", |
| 71 | + "TestSwiftHTMLBB", |
| 72 | + "TestSwiftHTMLKit", |
| 73 | + "TestSwiftHTMLPF", |
| 74 | + "TestVaporHTMLKit", |
| 75 | + .product(name: "Benchmark", package: "package-benchmark") |
| 76 | + ], |
| 77 | + path: "Benchmarks/Benchmarks", |
| 78 | + plugins: [ |
| 79 | + .plugin(name: "BenchmarkPlugin", package: "package-benchmark") |
| 80 | + ] |
| 81 | + ) |
| 82 | + ] |
| 83 | +) |
0 commit comments