1- // swift-tools-version: 5.9
1+ // swift-tools-version: 5.10
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import Foundation
@@ -18,6 +18,7 @@ func envEnable(_ key: String, default defaultValue: Bool = false) -> Bool {
1818}
1919
2020let isXcodeEnv = Context . environment [ " __CFBundleIdentifier " ] == " com.apple.dt.Xcode "
21+ let development = envEnable ( " OPENSWIFTUI_DEVELOPMENT " , default: false )
2122
2223// Xcode use clang as linker which supports "-iframework" while SwiftPM use swiftc as linker which supports "-Fsystem"
2324let systemFrameworkSearchFlag = isXcodeEnv ? " -iframework " : " -Fsystem "
@@ -27,7 +28,7 @@ var sharedSwiftSettings: [SwiftSetting] = [
2728 . define( " OPENSWIFTUI_SUPPRESS_DEPRECATED_WARNINGS " ) ,
2829]
2930
30- let warningsAsErrorsCondition = envEnable ( " OPENSWIFTUI_WERROR " , default: isXcodeEnv)
31+ let warningsAsErrorsCondition = envEnable ( " OPENSWIFTUI_WERROR " , default: isXcodeEnv && development )
3132if warningsAsErrorsCondition {
3233 sharedSwiftSettings. append ( . unsafeFlags( [ " -warnings-as-errors " ] ) )
3334}
@@ -167,7 +168,7 @@ let swiftTestingCondition = envEnable("OPENSWIFTUI_SWIFT_TESTING", default: true
167168if swiftTestingCondition {
168169 package . dependencies. append (
169170 // Fix it to be 0.3.0 before we bump to Swift 5.10
170- . package ( url: " https://github.com/apple/swift-testing " , exact: " 0.3 .0 " )
171+ . package ( url: " https://github.com/apple/swift-testing " , exact: " 0.6 .0 " )
171172 )
172173 openSwiftUITestTarget. dependencies. append (
173174 . product( name: " Testing " , package : " swift-testing " )
0 commit comments