mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
update to xcproj 1.2
This commit is contained in:
parent
8d1e77b9c3
commit
a4471e839e
@ -1,6 +1,5 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
@ -44,13 +43,11 @@
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
CFBP50493301 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
BF3862341101 /* MyFramework.framework in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
@ -191,7 +188,6 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
HBP299349701 /* Frameworks */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
@ -199,14 +195,12 @@
|
||||
files = (
|
||||
BF3515549501 /* MyFramework.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
HBP652326301 /* Frameworks */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
@ -297,14 +291,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
RBP299349701 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
RBP652326301 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
@ -315,7 +307,6 @@
|
||||
BF2513089601 /* LocalizedStoryboard.storyboard in Resources */,
|
||||
BF2250910101 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
@ -387,7 +378,6 @@
|
||||
files = (
|
||||
BF9001417701 /* TestProjectTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
SBP299349701 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
@ -395,7 +385,6 @@
|
||||
files = (
|
||||
BF9155249601 /* FrameworkFile.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
SBP652326301 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
@ -404,7 +393,6 @@
|
||||
BF1073850101 /* AppDelegate.swift in Sources */,
|
||||
BF1744565901 /* ViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
@ -704,7 +692,6 @@
|
||||
XCBC89077001 /* Debug */,
|
||||
XCBC60448901 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
};
|
||||
XCCL29934901 /* Build configuration list for PBXNativeTarget "MyFramework" */ = {
|
||||
@ -713,7 +700,6 @@
|
||||
XCBC19846901 /* Debug */,
|
||||
XCBC89204001 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
};
|
||||
XCCL65232601 /* Build configuration list for PBXNativeTarget "TestProject" */ = {
|
||||
@ -722,7 +708,6 @@
|
||||
XCBC37128501 /* Debug */,
|
||||
XCBC86437501 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
};
|
||||
XCCL81399401 /* Build configuration list for PBXProject "GeneratedProject" */ = {
|
||||
|
@ -69,8 +69,8 @@
|
||||
"repositoryURL": "https://github.com/xcodeswift/xcproj.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "cd1c329c6e092fdf5afbddf10dd59da564293aa6",
|
||||
"version": "0.4.1"
|
||||
"revision": "fc8cbfce8a6bc1a98773181afe8da97c2516b722",
|
||||
"version": "1.2.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -15,7 +15,7 @@ let package = Package(
|
||||
.package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "3.3.0"),
|
||||
.package(url: "https://github.com/kylef/Spectre.git", from: "0.7.0"),
|
||||
.package(url: "https://github.com/onevcat/Rainbow.git", from: "2.1.0"),
|
||||
.package(url: "https://github.com/xcodeswift/xcproj.git", from: "0.1.2"),
|
||||
.package(url: "https://github.com/xcodeswift/xcproj.git", from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "XcodeGen", dependencies: [
|
||||
|
@ -64,7 +64,7 @@ public class PBXProjGenerator {
|
||||
|
||||
public func generate() throws -> PBXProj {
|
||||
uuids = []
|
||||
project = PBXProj(archiveVersion: 1, objectVersion: 46, rootObject: generateUUID(PBXProject.self, spec.name))
|
||||
project = PBXProj(objectVersion: 46, rootObject: generateUUID(PBXProject.self, spec.name))
|
||||
|
||||
for group in spec.fileGroups {
|
||||
_ = try getGroups(path: basePath + group)
|
||||
@ -252,7 +252,7 @@ public class PBXProjGenerator {
|
||||
|
||||
if dependencyTarget.type.isLibrary || dependencyTarget.type.isFramework {
|
||||
let dependencyBuildFile = targetBuildFiles[dependencyTargetName]!
|
||||
let buildFile = PBXBuildFile(reference: generateUUID(PBXBuildFile.self, dependencyBuildFile.reference + target.name), fileRef: dependencyBuildFile.fileRef)
|
||||
let buildFile = PBXBuildFile(reference: generateUUID(PBXBuildFile.self, dependencyBuildFile.reference + target.name), fileRef: dependencyBuildFile.fileRef!)
|
||||
addObject(buildFile)
|
||||
targetFrameworkBuildFiles.append(buildFile.reference)
|
||||
}
|
||||
@ -430,11 +430,11 @@ public class PBXProjGenerator {
|
||||
|
||||
let nativeTarget = PBXNativeTarget(
|
||||
reference: targetNativeReferences[target.name]!,
|
||||
name: target.name,
|
||||
buildConfigurationList: buildConfigList.reference,
|
||||
buildPhases: buildPhases,
|
||||
buildRules: [],
|
||||
dependencies: dependencies,
|
||||
name: target.name,
|
||||
productReference: fileReference,
|
||||
productType: target.type)
|
||||
addObject(nativeTarget)
|
||||
@ -553,7 +553,7 @@ public class PBXProjGenerator {
|
||||
|
||||
// find base localisation variant group
|
||||
let name = path.lastComponentWithoutExtension
|
||||
let variantGroup = baseLocalisationVariantGroups.first { Path($0.name).lastComponentWithoutExtension == name }
|
||||
let variantGroup = baseLocalisationVariantGroups.first { Path($0.name!).lastComponentWithoutExtension == name }
|
||||
|
||||
let fileReference: String
|
||||
if let cachedFileReference = fileReferencesByPath[path] {
|
||||
|
@ -34,7 +34,8 @@ func projectGeneratorTests() {
|
||||
let spec = ProjectSpec(name: "test", targets: [framework], options: options)
|
||||
let project = try getProject(spec)
|
||||
guard let target = project.pbxproj.nativeTargets.first,
|
||||
let buildConfigs = project.pbxproj.configurationLists.getReference(target.buildConfigurationList),
|
||||
let buildConfigList = target.buildConfigurationList,
|
||||
let buildConfigs = project.pbxproj.configurationLists.getReference(buildConfigList),
|
||||
let buildConfigReference = buildConfigs.buildConfigurations.first,
|
||||
let buildConfig = project.pbxproj.buildConfigurations.getReference(buildConfigReference) else {
|
||||
throw failure("Build Config not found")
|
||||
|
Loading…
Reference in New Issue
Block a user