Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file addition problem in xcodeproj #34

Merged
merged 2 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
}
},
{
"package": "xcodeproj",
"repositoryURL": "https://github.com/tuist/xcodeproj.git",
"package": "XcodeProj",
"repositoryURL": "https://github.com/mrylmz/xcodeproj.git",
Jeehut marked this conversation as resolved.
Show resolved Hide resolved
"state": {
"branch": null,
"revision": "065f348754b6155b8037dc43876a8f2ee354b95d",
"version": "6.7.0"
"branch": "master",
"revision": "efb45143476117c0e7079fa605516ecb1d118919",
"version": null
}
}
]
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.package(url: "https://github.com/onevcat/Rainbow.git", .upToNextMajor(from: "3.1.4")),
.package(url: "https://github.com/jakeheis/SwiftCLI.git", .upToNextMajor(from: "5.2.2")),
.package(url: "https://github.com/kareman/SwiftShell.git", .upToNextMajor(from: "4.1.2")),
.package(url: "https://github.com/tuist/xcodeproj.git", .upToNextMajor(from: "6.7.0")),
.package(url: "https://github.com/mrylmz/xcodeproj.git", .branch("master")),
],
targets: [
.target(
Expand All @@ -28,12 +28,12 @@ let package = Package(
"Rainbow",
"SwiftCLI",
"SwiftShell",
"xcodeproj",
"XcodeProj",
]
),
.testTarget(
name: "AccioKitTests",
dependencies: ["AccioKit", "HandySwift", "xcodeproj"]
dependencies: ["AccioKit", "HandySwift", "XcodeProj"]
)
]
)
2 changes: 1 addition & 1 deletion Sources/AccioKit/Globals/Extensions/ArrayExtension.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import xcodeproj
import XcodeProj

extension Array where Element == Framework {
/// Flattens frameworks including subdependencies returns all in correct build order.
Expand Down
2 changes: 1 addition & 1 deletion Sources/AccioKit/Globals/Extensions/PBXProjExtension.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import xcodeproj
import XcodeProj

extension PBXProj {
func deleteAllTemporaryFileReferences() {
Expand Down
2 changes: 1 addition & 1 deletion Sources/AccioKit/Services/PlatformDetectorService.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import xcodeproj
import XcodeProj
import PathKit

enum PlatformDetectorError: Error {
Expand Down
2 changes: 1 addition & 1 deletion Sources/AccioKit/Services/TargetTypeDetectorService.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import xcodeproj
import XcodeProj
import PathKit

enum TargetTypeDetectorError: Error {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import HandySwift
import PathKit
import xcodeproj
import XcodeProj

final class XcodeProjectGeneratorService {
static let shared = XcodeProjectGeneratorService()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import PathKit
import xcodeproj
import XcodeProj

enum XcodeProjectIntegrationError: Error {
case targetNotFound
Expand Down Expand Up @@ -157,7 +157,10 @@ final class XcodeProjectIntegrationService {
print("Adding frameworks \(frameworkNames) to project navigator group '\(platformGroupName)' & linking with target '\(appTarget.targetName)' ...", level: .info)

for frameworkToAdd in frameworksToAdd {
let frameworkFileRef = try targetGroup.addFile(at: Path(frameworkToAdd.frameworkDirPath), sourceRoot: Path(workingDirectory))
let frameworkFileRef = try targetGroup.addNewFile(
at: Path(frameworkToAdd.frameworkDirPath),
sourceRoot: Path(workingDirectory)
)

if let files = frameworksBuildPhase.files, !files.contains(where: { $0.file?.path == frameworkFileRef.path }) {
_ = try frameworksBuildPhase.add(file: frameworkFileRef)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@testable import AccioKit
import PathKit
import xcodeproj
import XcodeProj
import XCTest

class XcodeProjectIntegrationServiceTests: XCTestCase {
Expand Down