Skip to content

Commit

Permalink
Enable MemberImportVisibility check on all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
rnro committed Dec 10, 2024
1 parent 7177b0c commit bc27ab4
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,22 @@ let swiftSettings: [SwiftSetting] = [

let package = Package(
name: "swift-openapi-runtime",
platforms: [
.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
],
products: [
.library(
name: "OpenAPIRuntime",
targets: ["OpenAPIRuntime"]
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"),
],
platforms: [.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)],
products: [.library(name: "OpenAPIRuntime", targets: ["OpenAPIRuntime"])],
dependencies: [.package(url: "https://github.com/apple/swift-http-types", from: "1.0.0")],
targets: [
.target(
name: "OpenAPIRuntime",
dependencies: [
.product(name: "HTTPTypes", package: "swift-http-types")
],
swiftSettings: swiftSettings
),
.testTarget(
name: "OpenAPIRuntimeTests",
dependencies: ["OpenAPIRuntime"],
dependencies: [.product(name: "HTTPTypes", package: "swift-http-types")],
swiftSettings: swiftSettings
),
), .testTarget(name: "OpenAPIRuntimeTests", dependencies: ["OpenAPIRuntime"], swiftSettings: swiftSettings),
]
)

for target in package.targets {
if target.type != .plugin {
var settings = target.swiftSettings ?? []
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
target.swiftSettings = settings
}
}

0 comments on commit bc27ab4

Please sign in to comment.