Skip to content

Commit

Permalink
Import TimecodeKitCore instead of entire TimecodeKit package
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Oct 19, 2024
1 parent a66c30c commit 968c84f
Show file tree
Hide file tree
Showing 30 changed files with 57 additions and 31 deletions.
25 changes: 25 additions & 0 deletions Examples/Advanced/MTCExample/MTCExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
E202381F2CC45C6D00661322 /* MIDIKitCore in Frameworks */ = {isa = PBXBuildFile; productRef = E202381E2CC45C6D00661322 /* MIDIKitCore */; };
E20238222CC45CB100661322 /* MIDIKitIO in Frameworks */ = {isa = PBXBuildFile; productRef = E20238212CC45CB100661322 /* MIDIKitIO */; };
E202386F2CC4676000661322 /* TimecodeKitCore in Frameworks */ = {isa = PBXBuildFile; productRef = E202386E2CC4676000661322 /* TimecodeKitCore */; };
E20238712CC4676000661322 /* TimecodeKitUI in Frameworks */ = {isa = PBXBuildFile; productRef = E20238702CC4676000661322 /* TimecodeKitUI */; };
E24FF24F28B9841E000A2055 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E24FF24E28B9841E000A2055 /* Assets.xcassets */; };
E2639D0726B145EE00AD0607 /* MIDIKitSync in Frameworks */ = {isa = PBXBuildFile; productRef = E2639D0626B145EE00AD0607 /* MIDIKitSync */; };
E275EAB02679A444008E396D /* MTCRecContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E275EAAF2679A444008E396D /* MTCRecContentView.swift */; };
Expand Down Expand Up @@ -46,9 +48,11 @@
files = (
E2639D0726B145EE00AD0607 /* MIDIKitSync in Frameworks */,
E20238222CC45CB100661322 /* MIDIKitIO in Frameworks */,
E202386F2CC4676000661322 /* TimecodeKitCore in Frameworks */,
E29EF039267BF71B00282F94 /* DunneAudioKit in Frameworks */,
E2B82F4E26B7F2A3006AF638 /* SwiftRadix in Frameworks */,
E202381F2CC45C6D00661322 /* MIDIKitCore in Frameworks */,
E20238712CC4676000661322 /* TimecodeKitUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -112,6 +116,8 @@
E2B82F4D26B7F2A3006AF638 /* SwiftRadix */,
E202381E2CC45C6D00661322 /* MIDIKitCore */,
E20238212CC45CB100661322 /* MIDIKitIO */,
E202386E2CC4676000661322 /* TimecodeKitCore */,
E20238702CC4676000661322 /* TimecodeKitUI */,
);
productName = MTCExample;
productReference = E2FAC4DA257884E000A6DD31 /* MTCExample.app */;
Expand Down Expand Up @@ -145,6 +151,7 @@
E29EF02D267BF47F00282F94 /* XCRemoteSwiftPackageReference "SwiftRadix" */,
E29EF037267BF71B00282F94 /* XCRemoteSwiftPackageReference "DunneAudioKit" */,
E20237F12CC454E500661322 /* XCLocalSwiftPackageReference "../../../../MIDIKit" */,
E202386D2CC4676000661322 /* XCRemoteSwiftPackageReference "TimecodeKit" */,
);
productRefGroup = E2FAC4DB257884E000A6DD31 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -408,6 +415,14 @@
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
E202386D2CC4676000661322 /* XCRemoteSwiftPackageReference "TimecodeKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/orchetect/TimecodeKit";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.3.0;
};
};
E29EF02D267BF47F00282F94 /* XCRemoteSwiftPackageReference "SwiftRadix" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/orchetect/SwiftRadix.git";
Expand Down Expand Up @@ -437,6 +452,16 @@
package = E20237F12CC454E500661322 /* XCLocalSwiftPackageReference "../../../../MIDIKit" */;
productName = MIDIKitIO;
};
E202386E2CC4676000661322 /* TimecodeKitCore */ = {
isa = XCSwiftPackageProductDependency;
package = E202386D2CC4676000661322 /* XCRemoteSwiftPackageReference "TimecodeKit" */;
productName = TimecodeKitCore;
};
E20238702CC4676000661322 /* TimecodeKitUI */ = {
isa = XCSwiftPackageProductDependency;
package = E202386D2CC4676000661322 /* XCRemoteSwiftPackageReference "TimecodeKit" */;
productName = TimecodeKitUI;
};
E2639D0626B145EE00AD0607 /* MIDIKitSync */ = {
isa = XCSwiftPackageProductDependency;
productName = MIDIKitSync;
Expand Down
2 changes: 1 addition & 1 deletion Examples/Advanced/MTCExample/MTCExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Cocoa
import MIDIKitIO
import MIDIKitSync
import SwiftUI
import TimecodeKit
import TimecodeKitCore

// AppDelegate for legacy macOS versions support
@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import MIDIKitIO
import MIDIKitSync
import SwiftRadix
import SwiftUI
import TimecodeKit
import TimecodeKitCore
import TimecodeKitUI

struct MTCGenContentView: View {
@EnvironmentObject private var midiManager: ObservableMIDIManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Combine
import MIDIKitIO
import MIDIKitSync
import SwiftUI
import TimecodeKit
import TimecodeKitCore

struct MTCRecContentView: View {
@EnvironmentObject private var midiManager: ObservableMIDIManager
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ let package = Package(
],

dependencies: [
.package(url: "https://github.com/orchetect/TimecodeKit", from: "2.1.0"),
.package(url: "https://github.com/orchetect/TimecodeKit", from: "2.3.0"),

// testing only:
.package(url: "https://github.com/orchetect/XCTestUtils", from: "1.0.3")
Expand Down Expand Up @@ -99,15 +99,15 @@ let package = Package(
name: "MIDIKitSMF",
dependencies: [
.target(name: "MIDIKitCore"),
"TimecodeKit"
.product(name: "TimecodeKitCore", package: "TimecodeKit")
],
swiftSettings: [.define("DEBUG", .when(configuration: .debug))]
),
.target(
name: "MIDIKitSync",
dependencies: [
.target(name: "MIDIKitCore"),
"TimecodeKit"
.product(name: "TimecodeKitCore", package: "TimecodeKit")
],
swiftSettings: [.define("DEBUG", .when(configuration: .debug))]
),
Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKit/MIDIKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// MIDIKitSMF
@_exported import MIDIKitSMF
@_exported import TimecodeKit // must re-export target's exports here
@_exported import TimecodeKitCore // must re-export target's exports here

// MIDIKitSync
@_exported import MIDIKitSync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Foundation
import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

// MARK: - SMPTEOffset

Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSMF/MIDIKitSMF.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
//

@_exported import MIDIKitCore
@_exported import TimecodeKit
@_exported import TimecodeKitCore
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MIDIKitSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

@_exported import MIDIKitCore
@_exported import TimecodeKit
@_exported import TimecodeKitCore

// MARK: - MTC

Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTC Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

/// Internal:
/// Returns `true` if both tuples are considered equal.
Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTCFrameRate Translation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

// MARK: - Derived rates

Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTCFrameRate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

// MTC hour byte includes frame rate information
// Only 4 base frame rates are described according to the MTC spec
Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTCGenerator/MTCEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal import MIDIKitInternals
@_implementationOnly import MIDIKitInternals
#endif

import TimecodeKit
import TimecodeKitCore

/// MTC (MIDI Timecode) stream encoder object.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTCGenerator/MTCGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal import MIDIKitInternals
@_implementationOnly import MIDIKitInternals
#endif

import TimecodeKit
import TimecodeKitCore

/// MTC sync generator.
public final class MTCGenerator: SendsMIDIEvents {
Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTCReceiver/MTCDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//

import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

/// MTC (MIDI Timecode) stream decoder object.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Dispatch
import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

// MARK: - State

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Foundation
import MIDIKitCore
import TimecodeKit
import TimecodeKitCore

extension MTCReceiver {
/// Options defining behavior of the receiver.
Expand Down
2 changes: 1 addition & 1 deletion Sources/MIDIKitSync/MTC/MTCReceiver/MTCReceiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal import MIDIKitInternals
@_implementationOnly import MIDIKitInternals
#endif

import TimecodeKit
import TimecodeKitCore

// MARK: - Receiver

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSMF
import TimecodeKit
import TimecodeKitCore
import XCTest

final class Event_SMPTEOffset_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
@testable import TimecodeKit
@testable import TimecodeKitCore
import XCTest

final class MTC_Generator_Encoder_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_Generator_Generator_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_Integration_Integration_Tests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/MIDIKitSyncTests/MTC/MTC Direction Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_Direction_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_MTCFrameRate_ScaledFrames_Tests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/MIDIKitSyncTests/MTC/MTC MTCFrameRate Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_MTCFrameRate_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_MTCFrameRate_Translation_Tests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/MIDIKitSyncTests/MTC/MTC Utilities Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_Utilities_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_Receiver_Decoder_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest

final class MTC_Receiver_SyncPolicy_Tests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if shouldTestCurrentPlatform

@testable import MIDIKitSync
import TimecodeKit
import TimecodeKitCore
import XCTest
import XCTestUtils

Expand Down

0 comments on commit 968c84f

Please sign in to comment.