Skip to content

Commit

Permalink
Merge pull request #9 from readdle/feature/AB-80559-spark-ios-swiftpm
Browse files Browse the repository at this point in the history
Include UI classes for non-Android platforms
  • Loading branch information
lxbndr authored Dec 9, 2024
2 parents d2ac767 + e793d10 commit d3d050f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Xcode (from gitignore.io)
build/
.build
.swiftpm
*.pbxuser
!default.pbxuser
*.mode1v3
Expand Down
17 changes: 12 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@

import PackageDescription

let excludedSources: [String]
#if TARGET_ANDROID
excludedSources = [
"Handler/OAuthWebViewController.swift",
"Handler/OAuthSwiftURLHandlerProxy.swift",
"Handler/ExtensionContextURLHandler.swift",
]
#else
excludedSources = []
#endif

let package = Package(
name: "OAuthSwift",
products: [
Expand All @@ -33,11 +44,7 @@ let package = Package(
.package(url: "https://github.com/httpswift/swifter.git", .upToNextMajor(from: "1.4.7"))
],
targets: [
.target(name: "OAuthSwift", dependencies: [], path: "Sources", exclude: [
"Handler/OAuthWebViewController.swift",
"Handler/OAuthSwiftURLHandlerProxy.swift",
"Handler/ExtensionContextURLHandler.swift"
]),
.target(name: "OAuthSwift", dependencies: [], path: "Sources", exclude: excludedSources),
.testTarget(name: "OAuthSwiftTests", dependencies: ["OAuthSwift", "Erik", "Kanna", "Swifter"], path: "OAuthSwiftTests"),
]
)

0 comments on commit d3d050f

Please sign in to comment.