Skip to content

Commit

Permalink
Depend on and import XCTestDynamicOverlay explicitly (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
myihsan authored May 13, 2023
1 parent 4dba5a5 commit 9b483d4
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 7 deletions.
31 changes: 24 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "0.4.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "0.8.0"),
],
targets: [

.target(
name: "AccessibilityDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics",
]
),
Expand All @@ -66,6 +68,7 @@ let package = Package(
.target(
name: "ApplicationDependency",
dependencies: [
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
.product(name: "Dependencies", package: "swift-dependencies"),
"DependenciesAdditionsBasics",
]
Expand All @@ -81,6 +84,7 @@ let package = Package(
name: "_AppStorageDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics",
"UserDefaultsDependency",
]
Expand All @@ -95,7 +99,8 @@ let package = Package(
.target(
name: "AssertionDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),
.testTarget(
Expand All @@ -109,6 +114,7 @@ let package = Package(
name: "BundleDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics",
]
),
Expand All @@ -122,7 +128,8 @@ let package = Package(
.target(
name: "CodableDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),
.testTarget(
Expand All @@ -135,7 +142,8 @@ let package = Package(
.target(
name: "CompressionDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),
.testTarget(
Expand Down Expand Up @@ -187,21 +195,24 @@ let package = Package(
.target(
name: "DependenciesAdditionsBasics",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),

.testTarget(
name: "DependenciesAdditionsBasicsTests",
dependencies: [
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics"
]
),

.target(
name: "DataDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),

Expand All @@ -217,6 +228,7 @@ let package = Package(
name: "DeviceDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics",
]
),
Expand All @@ -232,6 +244,7 @@ let package = Package(
name: "LoggerDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"BundleDependency",
]
),
Expand Down Expand Up @@ -264,7 +277,8 @@ let package = Package(
.target(
name: "NotificationCenterDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),

Expand All @@ -279,7 +293,8 @@ let package = Package(
.target(
name: "PathDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies")
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
]
),

Expand Down Expand Up @@ -311,6 +326,7 @@ let package = Package(
name: "ProcessInfoDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics",
]
),
Expand Down Expand Up @@ -356,6 +372,7 @@ let package = Package(
name: "UserNotificationsDependency",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
"DependenciesAdditionsBasics",
]
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@_spi(Internals) import DependenciesAdditionsBasics
import Foundation
import UIKit
import XCTestDynamicOverlay

extension Accessibility: DependencyKey {
public static var liveValue: Accessibility { .system }
Expand Down
1 change: 1 addition & 0 deletions Sources/CompressionDependency/Compressor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Compression
import Dependencies
import Foundation
import XCTestDynamicOverlay

extension DependencyValues {
/// A ``Compressor`` that can compress a `Data` value that you supply.
Expand Down
1 change: 1 addition & 0 deletions Sources/LoggerDependency/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// now.
// https://forums.swift.org/t/argument-must-be-a-static-method-or-property-of-oslogprivacy/38441/2
@preconcurrency import OSLog
import XCTestDynamicOverlay

@available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
extension DependencyValues {
Expand Down
1 change: 1 addition & 0 deletions Sources/PathDependency/PathDependency.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Dependencies
import Foundation
import XCTestDynamicOverlay

extension Path: DependencyKey {
/// An empty ``Path``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Dependencies
@_spi(Internals) import DependenciesAdditionsBasics
@preconcurrency import UserNotifications
import XCTestDynamicOverlay

extension DependencyValues {
/// An abstraction of `UNUserNotificationCenter`, the central object for managing
Expand Down
1 change: 1 addition & 0 deletions Tests/DependenciesAdditionsBasicsTests/ProxiesTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Dependencies
@_spi(Internals) import DependenciesAdditionsBasics
import XCTest
import XCTestDynamicOverlay

final class ProxiesTests: XCTestCase {
func testReadWriteProxy() {
Expand Down

0 comments on commit 9b483d4

Please sign in to comment.