mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
Merge pull request #723 from kateinoigakukun/katei/add-bundle-dependency
Add bundle dependency type
This commit is contained in:
commit
4339007e66
@ -12,6 +12,7 @@
|
||||
- Added `xcodegen dump` command [#710](https://github.com/yonaskolb/XcodeGen/pull/710) @yonaskolb
|
||||
- Added `--no-env` option to disable environment variables expansion [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari
|
||||
- Added custom group support for target sources [#621](https://github.com/yonaskolb/XcodeGen/pull/621) @sroebert @rcari
|
||||
- Added new dependency type, `bundle`. This allows targets to copy bundles from other projects [#616](https://github.com/yonaskolb/XcodeGen/pull/616) @bsmith11
|
||||
|
||||
#### Fixed
|
||||
- Improved variable expansion runtime [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari
|
||||
|
@ -374,13 +374,14 @@ targets:
|
||||
|
||||
### Dependency
|
||||
|
||||
A dependency can be one of a 3 types:
|
||||
A dependency can be one of a 6 types:
|
||||
|
||||
- `target: name` - links to another target
|
||||
- `framework: path` - links to a framework
|
||||
- `carthage: name` - helper for linking to a Carthage framework
|
||||
- `sdk: name` - links to a dependency with the SDK. This can either be a relative path within the sdk root or a single filename that references a framework (.framework) or lib (.tbd)
|
||||
- `package: name` - links to a Swift Package. The name must match the name of a package defined in the top level `packages`
|
||||
- `bundle: name` - adds the pre-built bundle for the supplied name to the copy resources build phase. This is useful when a dependency exists on a static library target that has an associated bundle target, both existing in a separate project. Only usable in target types which can copy resources.
|
||||
|
||||
**Linking options**:
|
||||
|
||||
|
@ -46,6 +46,7 @@ public struct Dependency: Equatable {
|
||||
case carthage(findFrameworks: Bool?, linkType: CarthageLinkType)
|
||||
case sdk(root: String?)
|
||||
case package(product: String?)
|
||||
case bundle
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,6 +78,9 @@ extension Dependency: JSONObjectConvertible {
|
||||
let product: String? = jsonDictionary.json(atKeyPath: "product")
|
||||
type = .package(product: product)
|
||||
reference = package
|
||||
} else if let bundle: String = jsonDictionary.json(atKeyPath: "bundle") {
|
||||
type = .bundle
|
||||
reference = bundle
|
||||
} else {
|
||||
throw SpecParsingError.invalidDependency(jsonDictionary)
|
||||
}
|
||||
@ -130,6 +134,8 @@ extension Dependency: JSONEncodable {
|
||||
dict["sdk"] = reference
|
||||
case .package:
|
||||
dict["package"] = reference
|
||||
case .bundle:
|
||||
dict["bundle"] = reference
|
||||
}
|
||||
|
||||
return dict
|
||||
|
@ -22,6 +22,7 @@ public class PBXProjGenerator {
|
||||
|
||||
var carthageFrameworksByPlatform: [String: Set<PBXFileElement>] = [:]
|
||||
var frameworkFiles: [PBXFileElement] = []
|
||||
var bundleFiles: [PBXFileElement] = []
|
||||
|
||||
var generated = false
|
||||
|
||||
@ -213,6 +214,17 @@ public class PBXProjGenerator {
|
||||
derivedGroups.append(group)
|
||||
}
|
||||
|
||||
if !bundleFiles.isEmpty {
|
||||
let group = addObject(
|
||||
PBXGroup(
|
||||
children: bundleFiles,
|
||||
sourceTree: .group,
|
||||
name: "Bundles"
|
||||
)
|
||||
)
|
||||
derivedGroups.append(group)
|
||||
}
|
||||
|
||||
mainGroup.children = Array(sourceGenerator.rootGroups)
|
||||
sortGroups(group: mainGroup)
|
||||
// add derived groups at the end
|
||||
@ -433,6 +445,7 @@ public class PBXProjGenerator {
|
||||
var copyFilesBuildPhasesFiles: [TargetSource.BuildPhase.CopyFilesSettings: [PBXBuildFile]] = [:]
|
||||
var copyFrameworksReferences: [PBXBuildFile] = []
|
||||
var copyResourcesReferences: [PBXBuildFile] = []
|
||||
var copyBundlesReferences: [PBXBuildFile] = []
|
||||
var copyWatchReferences: [PBXBuildFile] = []
|
||||
var packageDependencies: [XCSwiftPackageProductDependency] = []
|
||||
var extensions: [PBXBuildFile] = []
|
||||
@ -647,6 +660,23 @@ public class PBXProjGenerator {
|
||||
)
|
||||
dependencies.append(targetDependency)
|
||||
}
|
||||
case .bundle:
|
||||
// Static and dynamic libraries can't copy resources
|
||||
guard target.type != .staticLibrary && target.type != .dynamicLibrary else { break }
|
||||
|
||||
let fileReference = sourceGenerator.getFileReference(
|
||||
path: Path(dependency.reference),
|
||||
inPath: project.basePath,
|
||||
sourceTree: .buildProductsDir
|
||||
)
|
||||
|
||||
let pbxBuildFile = PBXBuildFile(file: fileReference, settings: nil)
|
||||
let buildFile = addObject(pbxBuildFile)
|
||||
copyBundlesReferences.append(buildFile)
|
||||
|
||||
if !bundleFiles.contains(fileReference) {
|
||||
bundleFiles.append(fileReference)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -740,6 +770,15 @@ public class PBXProjGenerator {
|
||||
buildPhases.append(resourcesBuildPhase)
|
||||
}
|
||||
|
||||
if !copyBundlesReferences.isEmpty {
|
||||
let copyBundlesPhase = addObject(PBXCopyFilesBuildPhase(
|
||||
dstSubfolderSpec: .resources,
|
||||
name: "Copy Bundles to Resources directory",
|
||||
files: copyBundlesReferences
|
||||
))
|
||||
buildPhases.append(copyBundlesPhase)
|
||||
}
|
||||
|
||||
let swiftObjCInterfaceHeader = project.getCombinedBuildSetting("SWIFT_OBJC_INTERFACE_HEADER_NAME", target: target, config: project.configs[0]) as? String
|
||||
|
||||
if target.type == .staticLibrary
|
||||
@ -1047,6 +1086,10 @@ public class PBXProjGenerator {
|
||||
dependencies[dependency.reference] = dependency
|
||||
}
|
||||
}
|
||||
case .bundle:
|
||||
if isTopLevel {
|
||||
dependencies[dependency.reference] = dependency
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ class FixtureTests: XCTestCase {
|
||||
func testProjectFixture() {
|
||||
describe {
|
||||
$0.it("generates Test Project") {
|
||||
try generateXcodeProject(specPath: fixturePath + "TestProject/AnotherProject/project.yml")
|
||||
try generateXcodeProject(specPath: fixturePath + "TestProject/project.yml")
|
||||
}
|
||||
$0.it("generates Carthage Project") {
|
||||
|
@ -0,0 +1,533 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.plug-in"; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
60D6679FB526839EAFEA2EEE /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3B245BCEF731A43880657E0E /* Configs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
60D6679FB526839EAFEA2EEE /* config.xcconfig */,
|
||||
);
|
||||
name = Configs;
|
||||
path = ../Configs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4E8CFA4275C972686621210C = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B245BCEF731A43880657E0E /* Configs */,
|
||||
6BB7980FAF18A93459B051A1 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6BB7980FAF18A93459B051A1 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
63A2D4898D974A06E85B07F8 /* BundleX */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 32C09717E388BCD9DB9E513C /* Build configuration list for PBXNativeTarget "BundleX" */;
|
||||
buildPhases = (
|
||||
B3BCC260A0A2F2F00458816F /* Sources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = BundleX;
|
||||
productName = BundleX;
|
||||
productReference = 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
1B166EB49192B73A9DD8E108 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
};
|
||||
buildConfigurationList = 3DFC1105373EDB6483D4BC5D /* Build configuration list for PBXProject "AnotherProject" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 4E8CFA4275C972686621210C;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
63A2D4898D974A06E85B07F8 /* BundleX */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
B3BCC260A0A2F2F00458816F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
011619A463B654F60012FC9E /* Test Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_ID_SUFFIX = .test;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = "Test Release";
|
||||
};
|
||||
03418826FAC3BC1FAB207D05 /* Production Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = "Production Release";
|
||||
};
|
||||
039F4FBE2C50C67BCD6BD67B /* Staging Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_ID_SUFFIX = .staging;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = "Staging Release";
|
||||
};
|
||||
270E1D32776D2D196D435FDA /* Staging Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_ID_SUFFIX = .staging;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"DEBUG=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = "Staging Debug";
|
||||
};
|
||||
49FA7F235A6CA1F941192151 /* Staging Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = "Staging Release";
|
||||
};
|
||||
4D621C4C28C8614EA5D6ADC2 /* Production Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = "Production Debug";
|
||||
};
|
||||
56ADF89C9058B2C25F6C80CE /* Staging Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = "Staging Debug";
|
||||
};
|
||||
5790F0FBCBF55A0DF258AD6A /* Production Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"DEBUG=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = "Production Debug";
|
||||
};
|
||||
5F14CE04E33ACD729A0EE6B6 /* Test Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = "Test Debug";
|
||||
};
|
||||
9BD6CAD5463121A1C3FED138 /* Production Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = "Production Release";
|
||||
};
|
||||
C3231A91F004B1D0018146DB /* Test Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 60D6679FB526839EAFEA2EEE /* config.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_ID_SUFFIX = .test;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"DEBUG=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = "Test Debug";
|
||||
};
|
||||
C7A4FCD4E277AD34B36E5185 /* Test Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = "Test Release";
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
32C09717E388BCD9DB9E513C /* Build configuration list for PBXNativeTarget "BundleX" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4D621C4C28C8614EA5D6ADC2 /* Production Debug */,
|
||||
9BD6CAD5463121A1C3FED138 /* Production Release */,
|
||||
56ADF89C9058B2C25F6C80CE /* Staging Debug */,
|
||||
49FA7F235A6CA1F941192151 /* Staging Release */,
|
||||
5F14CE04E33ACD729A0EE6B6 /* Test Debug */,
|
||||
C7A4FCD4E277AD34B36E5185 /* Test Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
};
|
||||
3DFC1105373EDB6483D4BC5D /* Build configuration list for PBXProject "AnotherProject" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5790F0FBCBF55A0DF258AD6A /* Production Debug */,
|
||||
03418826FAC3BC1FAB207D05 /* Production Release */,
|
||||
270E1D32776D2D196D435FDA /* Staging Debug */,
|
||||
039F4FBE2C50C67BCD6BD67B /* Staging Release */,
|
||||
C3231A91F004B1D0018146DB /* Test Debug */,
|
||||
011619A463B654F60012FC9E /* Test Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "Production Debug";
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 1B166EB49192B73A9DD8E108 /* Project object */;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
8
Tests/Fixtures/TestProject/AnotherProject/project.yml
Normal file
8
Tests/Fixtures/TestProject/AnotherProject/project.yml
Normal file
@ -0,0 +1,8 @@
|
||||
name: AnotherProject
|
||||
include: [../environments.yml]
|
||||
configFiles:
|
||||
Test Debug: ../Configs/config.xcconfig
|
||||
targets:
|
||||
BundleX:
|
||||
type: bundle
|
||||
platform: iOS
|
@ -122,6 +122,7 @@
|
||||
E4D0F435405DABCB51C5B684 /* TestFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; };
|
||||
E5DD0AD6F7AE1DD4AF98B83E /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 65C8D6D1DDC1512D396C07B7 /* Localizable.stringsdict */; };
|
||||
E8A135F768448632F8D77C8F /* StandaloneAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3571E41E19A5AB8AAAB04109 /* StandaloneAssets.xcassets */; };
|
||||
F07FC32458F3193917261C15 /* BundleX.bundle in Copy Bundles to Resources directory */ = {isa = PBXBuildFile; fileRef = 45C12576F5AA694DD0CE2132 /* BundleX.bundle */; };
|
||||
F5D71267BB5A326BDD69D532 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E55F45EACB0F382722D61C8D /* Assets.xcassets */; };
|
||||
F6537CE373C94809E6653758 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F7423E8738EECF04795C7601 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3F6BCB5FEFB16F1BA368059 /* InterfaceController.swift */; };
|
||||
@ -317,6 +318,16 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
32C3437B0218811108366142 /* Copy Bundles to Resources directory */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstSubfolderSpec = 7;
|
||||
files = (
|
||||
F07FC32458F3193917261C15 /* BundleX.bundle in Copy Bundles to Resources directory */,
|
||||
);
|
||||
name = "Copy Bundles to Resources directory";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
6CB76DFA8662672C4245AF41 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -468,6 +479,7 @@
|
||||
3EF21DF245F66BEF5446AAEF /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
40863AE6202CFCD0529D8438 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
45C12576F5AA694DD0CE2132 /* BundleX.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BF4D16042A80576D259160C /* Model 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 3.xcdatamodel"; sourceTree = "<group>"; };
|
||||
4D0BF47DF71A6DBA33ED23FD /* StaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = StaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5116B3B58070BCD09F1487BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
@ -711,6 +723,7 @@
|
||||
2E1E747C7BC434ADB80CC269 /* Headers */,
|
||||
6B1603BA83AA0C7B94E45168 /* ResourceFolder */,
|
||||
6BBE762F36D94AB6FFBFE834 /* SomeFile */,
|
||||
79DC4A1E4D2E0D3A215179BC /* Bundles */,
|
||||
FC1515684236259C50A7747F /* Frameworks */,
|
||||
AC523591AC7BE9275003D2DB /* Products */,
|
||||
);
|
||||
@ -790,6 +803,14 @@
|
||||
path = "App_watchOS Extension";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
79DC4A1E4D2E0D3A215179BC /* Bundles */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
45C12576F5AA694DD0CE2132 /* BundleX.bundle */,
|
||||
);
|
||||
name = Bundles;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
80C3A0E524EC1ABCB9149EA2 /* XPC Service */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -1118,6 +1139,7 @@
|
||||
buildPhases = (
|
||||
6F573D15DE1F149EF128C492 /* Sources */,
|
||||
8508BA1B733839E314AF2853 /* Resources */,
|
||||
32C3437B0218811108366142 /* Copy Bundles to Resources directory */,
|
||||
865AAD9909027AC34D1374EA /* CopyFiles */,
|
||||
37182EC208DBF03DB1BAF452 /* Carthage */,
|
||||
117840B4DBC04099F6779D00 /* Frameworks */,
|
||||
|
10
Tests/Fixtures/TestProject/Workspace.xcworkspace/contents.xcworkspacedata
generated
Normal file
10
Tests/Fixtures/TestProject/Workspace.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Project.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:AnotherProject/AnotherProject.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -4,10 +4,10 @@ set -e
|
||||
carthage bootstrap --cache-builds
|
||||
echo "
|
||||
⚙️ Building iOS app"
|
||||
xcodebuild -quiet -project Project.xcodeproj -scheme "App_iOS Test" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
|
||||
xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
|
||||
echo "✅ Successfully built iOS app"
|
||||
|
||||
echo "
|
||||
⚙️ Building macOS app"
|
||||
xcodebuild -quiet -project Project.xcodeproj -scheme "App_macOS" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
|
||||
xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
|
||||
echo "✅ Successfully built macOS app"
|
||||
|
@ -98,6 +98,7 @@ targets:
|
||||
- target: App_watchOS
|
||||
- target: iMessageApp
|
||||
- sdk: Contacts.framework
|
||||
- bundle: BundleX.bundle
|
||||
scheme:
|
||||
testTargets:
|
||||
- App_iOS_Tests
|
||||
|
@ -381,6 +381,7 @@ class ProjectGeneratorTests: XCTestCase {
|
||||
//
|
||||
|
||||
var expectedResourceFiles: [String: Set<String>] = [:]
|
||||
var expectedBundlesFiles: [String: Set<String>] = [:]
|
||||
var expectedLinkedFiles: [String: Set<String>] = [:]
|
||||
var expectedEmbeddedFrameworks: [String: Set<String>] = [:]
|
||||
|
||||
@ -433,9 +434,11 @@ class ProjectGeneratorTests: XCTestCase {
|
||||
Dependency(type: .target, reference: iosFrameworkX.name /* , link: false */ ),
|
||||
Dependency(type: .framework, reference: "FrameworkX.framework" /* , link: false */ ),
|
||||
Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "CarthageZ"),
|
||||
Dependency(type: .bundle, reference: "BundleA.bundle"),
|
||||
]
|
||||
)
|
||||
expectedResourceFiles[staticLibrary.name] = Set()
|
||||
expectedBundlesFiles[staticLibrary.name] = Set()
|
||||
expectedLinkedFiles[staticLibrary.name] = Set([
|
||||
iosFrameworkZ.filename,
|
||||
"FrameworkZ.framework",
|
||||
@ -463,9 +466,13 @@ class ProjectGeneratorTests: XCTestCase {
|
||||
// Statically linked, so don't embed into test
|
||||
Dependency(type: .target, reference: staticLibrary.name),
|
||||
Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "CarthageB", embed: false),
|
||||
Dependency(type: .bundle, reference: "BundleA.bundle"),
|
||||
]
|
||||
)
|
||||
expectedResourceFiles[iosFrameworkA.name] = Set()
|
||||
expectedBundlesFiles[iosFrameworkA.name] = Set([
|
||||
"BundleA.bundle"
|
||||
])
|
||||
expectedLinkedFiles[iosFrameworkA.name] = Set([
|
||||
"FrameworkC.framework",
|
||||
iosFrameworkZ.filename,
|
||||
@ -594,6 +601,8 @@ class ProjectGeneratorTests: XCTestCase {
|
||||
let resourcesPhases = pbxProject.resourcesBuildPhases.filter { buildPhases.contains($0) }
|
||||
let frameworkPhases = pbxProject.frameworksBuildPhases.filter { buildPhases.contains($0) }
|
||||
let copyFilesPhases = pbxProject.copyFilesBuildPhases.filter { buildPhases.contains($0) }
|
||||
let embedFrameworkPhase = copyFilesPhases.first { $0.dstSubfolderSpec == .frameworks }
|
||||
let copyBundlesPhase = copyFilesPhases.first { $0.dstSubfolderSpec == .resources }
|
||||
|
||||
// All targets should have a compile sources phase,
|
||||
// except for the sticker pack one
|
||||
@ -622,17 +631,23 @@ class ProjectGeneratorTests: XCTestCase {
|
||||
try expect(Set(linkFrameworks)) == expectedLinkedFiles
|
||||
}
|
||||
|
||||
var expectedCopyFilesPhasesCount = 0
|
||||
// ensure only the right things are embedded, no more, no less
|
||||
if let expectedEmbeddedFrameworks = expectedEmbeddedFrameworks[target.name] {
|
||||
try expect(copyFilesPhases.count) == (expectedEmbeddedFrameworks.isEmpty ? 0 : 1)
|
||||
if !expectedEmbeddedFrameworks.isEmpty {
|
||||
let copyFiles = (copyFilesPhases[0].files ?? [])
|
||||
.compactMap { $0.file?.nameOrPath }
|
||||
try expect(Set(copyFiles)) == expectedEmbeddedFrameworks
|
||||
}
|
||||
} else {
|
||||
try expect(copyFilesPhases.count) == 0
|
||||
if let expectedEmbeddedFrameworks = expectedEmbeddedFrameworks[target.name], !expectedEmbeddedFrameworks.isEmpty {
|
||||
expectedCopyFilesPhasesCount += 1
|
||||
let copyFiles = (embedFrameworkPhase?.files ?? [])
|
||||
.compactMap { $0.file?.nameOrPath }
|
||||
try expect(Set(copyFiles)) == expectedEmbeddedFrameworks
|
||||
}
|
||||
|
||||
if let expectedBundlesFiles = expectedBundlesFiles[target.name],
|
||||
target.type != .staticLibrary && target.type != .dynamicLibrary {
|
||||
expectedCopyFilesPhasesCount += 1
|
||||
let copyBundles = (copyBundlesPhase?.files ?? [])
|
||||
.compactMap { $0.file?.nameOrPath }
|
||||
try expect(Set(copyBundles)) == expectedBundlesFiles
|
||||
}
|
||||
try expect(copyFilesPhases.count) == expectedCopyFilesPhasesCount
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
swift run xcodegen --spec Tests/Fixtures/TestProject/AnotherProject/project.yml
|
||||
swift run xcodegen --spec Tests/Fixtures/TestProject/project.yml
|
||||
swift run xcodegen --spec Tests/Fixtures/CarthageProject/project.yml
|
||||
swift run xcodegen --spec Tests/Fixtures/SPM/project.yml
|
||||
|
Loading…
Reference in New Issue
Block a user