Commit 340bdb1e authored by Eloy Duran's avatar Eloy Duran

Remove support files group from projects and create it programmatically for each target.

parent 2580df10
......@@ -4,3 +4,11 @@ generate_bridge_support!
dependency 'ASIHTTPRequest'
dependency 'SBJson'
target :debug do
dependency 'CocoaLumberjack'
end
target :test, :exclusive => true do
dependency 'Kiwi'
end
......@@ -99,10 +99,15 @@ module Pod
end
xcconfig.merge!('USER_HEADER_SEARCH_PATHS' => user_header_search_paths.sort.uniq.join(" "))
prefix_file = @xcodeproj.files.new('path' => prefix_header_filename)
prefix_file.group = @xcodeproj.pods.groups.find { |child| child.name == "Supporting Files" }
xcconfig_file = @xcodeproj.files.new("path" => xcconfig_filename)
# Add all the target related support files to the group, even the copy
# resources script although the project doesn't actually use them.
support_files_group = @xcodeproj.groups.find do |group|
group.name == "Targets Support Files"
end.groups.new("name" => @definition.lib_name)
support_files_group.files.new('path' => copy_resources_filename)
prefix_file = support_files_group.files.new('path' => prefix_header_filename)
xcconfig_file = support_files_group.files.new("path" => xcconfig_filename)
# Assign the xcconfig as the base config of each config.
@target.buildConfigurations.each do |config|
config.baseConfiguration = xcconfig_file
config.buildSettings['GCC_PREFIX_HEADER'] = prefix_header_filename
......@@ -144,6 +149,8 @@ module Pod
group.children.new('path' => path.to_s)
end
end
# Add a group to hold all the target support files
xcodeproj.main_group.groups.new('name' => 'Targets Support Files')
end
@xcodeproj
end
......
......@@ -204,11 +204,16 @@ module Pod
end
def files
list_by_class(childReferences, Pod::Xcode::Project::PBXFileReference)
list_by_class(childReferences, Pod::Xcode::Project::PBXFileReference) do |file|
file.group = self
end
end
def source_files
list_by_class(childReferences, Pod::Xcode::Project::PBXFileReference, files.reject { |file| file.buildFiles.empty? })
files = self.files.reject { |file| file.buildFiles.empty? }
list_by_class(childReferences, Pod::Xcode::Project::PBXFileReference, files) do |file|
file.group = self
end
end
def groups
......
......@@ -35,18 +35,9 @@
name = Frameworks;
sourceTree = "<group>";
};
518ACD451446050200F6BE80 /* Supporting Files */ = {
isa = PBXGroup;
children = (
);
name = "Supporting Files";
path = Pods;
sourceTree = "<group>";
};
518ACD5B1446449B00F6BE80 /* Pods */ = {
isa = PBXGroup;
children = (
518ACD451446050200F6BE80 /* Supporting Files */,
);
name = Pods;
sourceTree = "<group>";
......
......@@ -35,18 +35,9 @@
name = Frameworks;
sourceTree = "<group>";
};
515B0FBB141D52E0001DC3E6 /* Supporting Files */ = {
isa = PBXGroup;
children = (
);
name = "Supporting Files";
path = Pods;
sourceTree = "<group>";
};
515B0FC9141D5FBE001DC3E6 /* Pods */ = {
isa = PBXGroup;
children = (
515B0FBB141D52E0001DC3E6 /* Supporting Files */,
);
name = Pods;
sourceTree = "<group>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment