mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-20 09:08:46 +03:00
Default directlyEmbedCarthageDependencies
to true
for tests
This commit is contained in:
parent
8ebf27a122
commit
b18cd551cb
@ -172,7 +172,7 @@ Settings are merged in the following order: groups, base, configs.
|
||||
- [ ] **dependencies**: **[[Dependency](#dependency)]** - Dependencies for the target
|
||||
- [ ] **templates**: **[String]** - A list of target templates that will be merged in order
|
||||
- [ ] **transitivelyLinkDependencies**: **Bool** - If this is not specified the value from the project set in [Options](#options)`.transitivelyLinkDependencies` will be used.
|
||||
- [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for `macOS` `platform`.
|
||||
- [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for `macOS` `platform` targets and all tests.
|
||||
- [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any catagories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have catagories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone.
|
||||
- [ ] **prebuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *before* any other build phases
|
||||
- [ ] **postbuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *after* any other build phases
|
||||
|
@ -436,7 +436,7 @@ public class PBXProjGenerator {
|
||||
let targetDependencies = (target.transitivelyLinkDependencies ?? project.options.transitivelyLinkDependencies) ?
|
||||
getAllDependenciesPlusTransitiveNeedingEmbedding(target: target) : target.dependencies
|
||||
|
||||
let directlyEmbedCarthage = target.directlyEmbedCarthageDependencies ?? (target.platform == .macOS)
|
||||
let directlyEmbedCarthage = target.directlyEmbedCarthageDependencies ?? (target.platform == .macOS || target.type.isTest)
|
||||
|
||||
for dependency in targetDependencies {
|
||||
|
||||
|
@ -671,7 +671,6 @@
|
||||
buildConfigurationList = CL_123503999387 /* Build configuration list for PBXNativeTarget "App_iOS_UITests" */;
|
||||
buildPhases = (
|
||||
SBP_12350399938 /* Sources */,
|
||||
SSBP_3150067808 /* Carthage */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -832,7 +831,6 @@
|
||||
buildConfigurationList = CL_783122899910 /* Build configuration list for PBXNativeTarget "App_iOS_Tests" */;
|
||||
buildPhases = (
|
||||
SBP_78312289991 /* Sources */,
|
||||
SSBP_6451525835 /* Carthage */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -1006,22 +1004,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "echo \"You ran a script\"\n";
|
||||
};
|
||||
SSBP_3150067808 /* Carthage */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/Carthage/Build/iOS/Alamofire.framework",
|
||||
);
|
||||
name = Carthage;
|
||||
outputPaths = (
|
||||
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Alamofire.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "carthage copy-frameworks\n";
|
||||
};
|
||||
SSBP_3886691194 /* MyScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -1080,22 +1062,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "echo \"You ran a script\"\n";
|
||||
};
|
||||
SSBP_6451525835 /* Carthage */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/Carthage/Build/iOS/Alamofire.framework",
|
||||
);
|
||||
name = Carthage;
|
||||
outputPaths = (
|
||||
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Alamofire.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "carthage copy-frameworks\n";
|
||||
};
|
||||
SSBP_8106229290 /* Carthage */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -477,7 +477,8 @@ class ProjectGeneratorTests: XCTestCase {
|
||||
Dependency(type: .target, reference: app.name),
|
||||
Dependency(type: .target, reference: iosFrameworkB.name),
|
||||
Dependency(type: .carthage, reference: "CarthageD"),
|
||||
]
|
||||
],
|
||||
directlyEmbedCarthageDependencies: false
|
||||
)
|
||||
expectedResourceFiles[appTest.name] = Set([
|
||||
resourceBundle.filename,
|
||||
|
Loading…
Reference in New Issue
Block a user