Skip to content

Commit c097c21

Browse files
authored
Merge pull request #57 from RougeWare/feature/56-Compiler-error-SwiftUI-previews_v3
3.0.0: Attempt to resolve compiler error with SwiftUI previews & generic targets by removing compiler conditionals
2 parents 003b70f + 4a0fd2d commit c097c21

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Package.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
// swift-tools-version:5.1
1+
// swift-tools-version:5.2
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
55

66
let package = Package(
77
name: "RectangleTools",
8+
9+
platforms: [
10+
.macOS(.v10_15),
11+
.iOS(.v13),
12+
.tvOS(.v13),
13+
.watchOS(.v6),
14+
],
15+
816
products: [
917
// Products define the executables and libraries produced by a package, and make them visible to other packages.
1018
.library(
@@ -13,7 +21,7 @@ let package = Package(
1321
],
1422
dependencies: [
1523
// Dependencies declare other packages that this package depends on.
16-
.package(url: "https://github.com/RougeWare/Swift-MultiplicativeArithmetic.git", from: "1.0.0"),
24+
.package(name: "MultiplicativeArithmetic", url: "https://github.com/RougeWare/Swift-MultiplicativeArithmetic.git", from: "1.0.0"),
1725
],
1826
targets: [
1927
// Targets are the basic building blocks of a package. A target can define a module or a test suite.

Sources/RectangleTools/Default Conformances/EdgeInsets + FourSided.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// Copyright © 2020 Ben Leggiero. All rights reserved.
77
//
88

9+
import SwiftUI
10+
911
#if canImport(WatchKit)
1012
import WatchKit
1113

@@ -85,11 +87,6 @@ extension NSEdgeInsets: Equatable {}
8587

8688

8789

88-
#if canImport(SwiftUI) && !RECTANGLETOOLS_EXCLUDE_SWIFTUI_EDGEINSETS
89-
import SwiftUI
90-
91-
92-
9390
@available(macOS 10.15, *)
9491
@available(iOS 13, *)
9592
@available(tvOS 13, *)
@@ -142,11 +139,6 @@ public extension EdgeInsets {
142139
}
143140
}
144141
}
145-
#else
146-
147-
public typealias EdgeInsets = NativeEdgeInsets
148-
149-
#endif
150142

151143

152144

0 commit comments

Comments
 (0)