Skip to content

Commit

Permalink
Break the Subscription module’s dependency on BSK (#802)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1199230911884351/1207201481522088/f
iOS PR: duckduckgo/iOS#2804
macOS PR: duckduckgo/macos-browser#2721
What kind of version bump will this require?: Major

Description:

This PR removes the BSK dependency from the Subscription library.
  • Loading branch information
samsymons authored May 1, 2024
1 parent dd1901a commit 7c41d69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
11 changes: 3 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ let package = Package(
"UserScript",
"ContentBlocking",
"SecureStorage",
"Subscription"
],
resources: [
.process("ContentBlocking/UserScripts/contentblockerrules.js"),
Expand Down Expand Up @@ -322,8 +323,7 @@ let package = Package(
.target(
name: "Subscription",
dependencies: [
"BrowserServicesKit",
"Common",
"Common"
],
swiftSettings: [
.define("DEBUG", .when(configuration: .debug))
Expand Down Expand Up @@ -386,6 +386,7 @@ let package = Package(
"RemoteMessaging", // Move tests later (lots of test dependencies in BSK)
"SecureStorageTestsUtils",
"TestUtils",
"Subscription"
],
resources: [
.copy("Resources")
Expand Down Expand Up @@ -502,12 +503,6 @@ let package = Package(
"TestUtils",
]
),
.testTarget(
name: "SubscriptionTests",
dependencies: [
"Subscription",
]
),
.testTarget(
name: "PixelKitTests",
dependencies: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// limitations under the License.
//

import BrowserServicesKit
import Subscription

public protocol SubscriptionFeatureAvailability {
var isFeatureAvailable: Bool { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
//

import XCTest
import BrowserServicesKit
import Common
import Combine
@testable import Subscription
@testable import BrowserServicesKit

final class SubscriptionFeatureAvailabilityTests: XCTestCase {

Expand Down Expand Up @@ -231,10 +231,6 @@ final class SubscriptionFeatureAvailabilityTests: XCTestCase {
}
}

class MockInternalUserStoring: InternalUserStoring {
var isInternalUser: Bool = false
}

class MockPrivacyConfiguration: PrivacyConfiguration {

func isEnabled(featureKey: PrivacyFeature, versionProvider: AppVersionProvider) -> Bool { true }
Expand Down

0 comments on commit 7c41d69

Please sign in to comment.