Skip to content

Commit

Permalink
Exclude unused privacy manifests. (#2716)
Browse files Browse the repository at this point in the history
Motivation:

On Darwin privacy manifests should be published as resources.
On other platforms they result in a warning if not excluded.

Modifications:

Alter Package.swift to exclude privacy manifests when not included.

Result:

Fewer warnings in non-darwin builds.
  • Loading branch information
PeterAdams-A authored May 16, 2024
1 parent 6753556 commit 609469f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ let package = Package(
"_NIODataStructures",
swiftAtomics,
],
exclude: includePrivacyManifest ? [] : ["PrivacyInfo.xcprivacy"],
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : []
),
.target(
Expand Down Expand Up @@ -208,6 +209,7 @@ let package = Package(
swiftSystem,
],
path: "Sources/NIOFileSystem",
exclude: includePrivacyManifest ? [] : ["PrivacyInfo.xcprivacy"],
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : [],
swiftSettings: [
.define("ENABLE_MOCKING", .when(configuration: .debug))
Expand Down

0 comments on commit 609469f

Please sign in to comment.