Skip to content

Commit bc27ab4

Browse files
committed
Enable MemberImportVisibility check on all targets
1 parent 7177b0c commit bc27ab4

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

Package.swift

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,22 @@ let swiftSettings: [SwiftSetting] = [
2323

2424
let package = Package(
2525
name: "swift-openapi-runtime",
26-
platforms: [
27-
.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
28-
],
29-
products: [
30-
.library(
31-
name: "OpenAPIRuntime",
32-
targets: ["OpenAPIRuntime"]
33-
)
34-
],
35-
dependencies: [
36-
.package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"),
37-
],
26+
platforms: [.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)],
27+
products: [.library(name: "OpenAPIRuntime", targets: ["OpenAPIRuntime"])],
28+
dependencies: [.package(url: "https://github.com/apple/swift-http-types", from: "1.0.0")],
3829
targets: [
3930
.target(
4031
name: "OpenAPIRuntime",
41-
dependencies: [
42-
.product(name: "HTTPTypes", package: "swift-http-types")
43-
],
44-
swiftSettings: swiftSettings
45-
),
46-
.testTarget(
47-
name: "OpenAPIRuntimeTests",
48-
dependencies: ["OpenAPIRuntime"],
32+
dependencies: [.product(name: "HTTPTypes", package: "swift-http-types")],
4933
swiftSettings: swiftSettings
50-
),
34+
), .testTarget(name: "OpenAPIRuntimeTests", dependencies: ["OpenAPIRuntime"], swiftSettings: swiftSettings),
5135
]
5236
)
37+
38+
for target in package.targets {
39+
if target.type != .plugin {
40+
var settings = target.swiftSettings ?? []
41+
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
42+
target.swiftSettings = settings
43+
}
44+
}

0 commit comments

Comments
 (0)