-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Description
I want to control the LibraryType(non/static/dynamic) with traits but it is not possible now
Expected behavior
traits is part of LibraryType condition
.library(
name: "XXXKit",
type: .condition { traits in
if traits.contains("iOSDynamic") {
.dynamic
} else {
.static
}
},
targets: ["XXXKit"]
),
Or traits can be access in Package.swift directly
let traits = PackageDescription.Trait.currents
...
.library(
name: "XXXKit",
type: traits.contains("iOSDynamic") ? .dynamic : .static,
targets: ["XXXKit"]
),
Actual behavior
LibraryType is a enum, no condition support
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version && uname -a
)
No response