Skip to content

Commit

Permalink
feat: add optional projectPath to XcodeProj
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkolean committed Dec 20, 2024
1 parent 0500afc commit b9c3e13
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Sources/XcodeProj/Project/XcodeProj.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public final class XcodeProj: Equatable {
/// Project workspace
public var workspace: XCWorkspace

/// The path to the `.xcodeproj` directory.
private let projectPath: Path?

/// .pbxproj representation
public var pbxproj: PBXProj

Expand Down Expand Up @@ -43,6 +46,7 @@ public final class XcodeProj: Equatable {
.glob("*.xcuserdatad")
.compactMap { try? XCUserData(path: $0) }

projectPath = path
self.pbxproj = pbxproj
self.workspace = workspace
self.sharedData = sharedData
Expand All @@ -63,11 +67,13 @@ public final class XcodeProj: Equatable {
public init(workspace: XCWorkspace,
pbxproj: PBXProj,
sharedData: XCSharedData? = nil,
userData: [XCUserData] = []) {
userData: [XCUserData] = [],
projectPath: Path? = nil) {
self.workspace = workspace
self.pbxproj = pbxproj
self.sharedData = sharedData
self.userData = userData
self.projectPath = projectPath
}

// MARK: - Equatable
Expand All @@ -76,7 +82,8 @@ public final class XcodeProj: Equatable {
lhs.workspace == rhs.workspace &&
lhs.pbxproj == rhs.pbxproj &&
lhs.sharedData == rhs.sharedData &&
lhs.userData == rhs.userData
lhs.userData == rhs.userData &&
lhs.projectPath == rhs.projectPath
}
}

Expand Down

0 comments on commit b9c3e13

Please sign in to comment.