Skip to content

Commit

Permalink
Add swift-numerics dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed May 5, 2024
1 parent acbee3c commit 47a81fd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
11 changes: 10 additions & 1 deletion Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"originHash" : "9bbeb48f673780072b1cb86308961efbc9eaf1cec5a177dcbbb7b9424cd07a78",
"originHash" : "08c5b038cf77a79fefbf15fe8ee430265dbe92590190dde25f83708222a7942f",
"pins" : [
{
"identity" : "swift-numerics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-numerics",
"state" : {
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
Expand Down
30 changes: 18 additions & 12 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,26 @@ if attributeGraphCondition {
// Remove this when swift-testing is 1.0.0
let swiftTestingCondition = envEnable("OPENGRAPH_SWIFT_TESTING", default: true)
if swiftTestingCondition {
package.dependencies.append(
.package(url: "https://github.com/apple/swift-testing", exact: "0.6.0")
)
openGraphTestTarget.dependencies.append(
.product(name: "Testing", package: "swift-testing")
)
var dependencies = package.dependencies
dependencies.append(contentsOf: [
.package(url: "https://github.com/apple/swift-testing", exact: "0.6.0"),
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),
])
package.dependencies = dependencies

func addTestDependency(_ target: Target) {
var dependencies = target.dependencies
dependencies.append(contentsOf: [
.product(name: "Testing", package: "swift-testing"),
.product(name: "RealModule", package: "swift-numerics"),
])
target.dependencies = dependencies
}
addTestDependency(openGraphTestTarget)
package.targets.append(openGraphTestTarget)
openGraphCompatibilityTestTarget.dependencies.append(
.product(name: "Testing", package: "swift-testing")
)
addTestDependency(openGraphCompatibilityTestTarget)
package.targets.append(openGraphCompatibilityTestTarget)
openGraphTempTestTarget.dependencies.append(
.product(name: "Testing", package: "swift-testing")
)
addTestDependency(openGraphTempTestTarget)
package.targets.append(openGraphTempTestTarget)
}

Expand Down

0 comments on commit 47a81fd

Please sign in to comment.