mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Move Carthage copy-frameworks script earlier
With Xcode 10 run scripts will prevent dependent targets from starting to compile. The Carthage copy-frameworks script should be right after compilation to speed up compilation.
This commit is contained in:
@@ -698,6 +698,26 @@ public class PBXProjGenerator {
|
||||
buildPhases += copyFilesBuildPhasesFiles
|
||||
.filter { $0.key.phaseOrder == .postCompile }
|
||||
.map { generateCopyFiles(targetName: target.name, copyFiles: $0, buildPhaseFiles: $1) }
|
||||
|
||||
if !carthageFrameworksToEmbed.isEmpty {
|
||||
let inputPaths = carthageFrameworksToEmbed
|
||||
.map { "$(SRCROOT)/\(carthageBuildPath)/\(target.platform)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let outputPaths = carthageFrameworksToEmbed
|
||||
.map { "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let carthageExecutable = project.options.carthageExecutablePath ?? "carthage"
|
||||
let carthageScript = createObject(
|
||||
id: "Carthage" + target.name,
|
||||
PBXShellScriptBuildPhase(
|
||||
files: [],
|
||||
name: "Carthage",
|
||||
inputPaths: inputPaths,
|
||||
outputPaths: outputPaths,
|
||||
shellPath: "/bin/sh",
|
||||
shellScript: "\(carthageExecutable) copy-frameworks\n"
|
||||
)
|
||||
)
|
||||
buildPhases.append(carthageScript.reference)
|
||||
}
|
||||
|
||||
if !targetFrameworkBuildFiles.isEmpty {
|
||||
|
||||
@@ -754,27 +774,6 @@ public class PBXProjGenerator {
|
||||
buildPhases.append(copyFilesPhase.reference)
|
||||
}
|
||||
|
||||
if !carthageFrameworksToEmbed.isEmpty {
|
||||
|
||||
let inputPaths = carthageFrameworksToEmbed
|
||||
.map { "$(SRCROOT)/\(carthageBuildPath)/\(target.platform)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let outputPaths = carthageFrameworksToEmbed
|
||||
.map { "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let carthageExecutable = project.options.carthageExecutablePath ?? "carthage"
|
||||
let carthageScript = createObject(
|
||||
id: "Carthage" + target.name,
|
||||
PBXShellScriptBuildPhase(
|
||||
files: [],
|
||||
name: "Carthage",
|
||||
inputPaths: inputPaths,
|
||||
outputPaths: outputPaths,
|
||||
shellPath: "/bin/sh",
|
||||
shellScript: "\(carthageExecutable) copy-frameworks\n"
|
||||
)
|
||||
)
|
||||
buildPhases.append(carthageScript.reference)
|
||||
}
|
||||
|
||||
let buildRules = target.buildRules.map { buildRule in
|
||||
createObject(
|
||||
id: "\(target.name)-\(buildRule.action)-\(buildRule.fileType)",
|
||||
|
||||
@@ -880,9 +880,9 @@
|
||||
buildPhases = (
|
||||
SBP_32467107793 /* Sources */,
|
||||
RBP_32467107793 /* Resources */,
|
||||
SSBP_5954948530 /* Carthage */,
|
||||
FBP_32467107793 /* Frameworks */,
|
||||
CFBP_4684049960 /* Embed App Extensions */,
|
||||
SSBP_5954948530 /* Carthage */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -1095,10 +1095,10 @@
|
||||
SBP_82523211050 /* Sources */,
|
||||
RBP_82523211050 /* Resources */,
|
||||
CFBP_7191905390 /* CopyFiles */,
|
||||
SSBP_8106229290 /* Carthage */,
|
||||
FBP_82523211050 /* Frameworks */,
|
||||
CFBP_6493932244 /* Embed Frameworks */,
|
||||
CFBP_2836118931 /* Embed Watch Content */,
|
||||
SSBP_8106229290 /* Carthage */,
|
||||
SSBP_5106020372 /* Strip Unused Architectures from Frameworks */,
|
||||
SSBP_8706434794 /* MyScript */,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user