Skip to content

Commit

Permalink
Dev: include UI classes for non-Android platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
lxbndr committed Dec 9, 2024
1 parent d2ac767 commit e793d10
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 e793d10

Please sign in to comment.