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! ...@@ -4,3 +4,11 @@ generate_bridge_support!
dependency 'ASIHTTPRequest' dependency 'ASIHTTPRequest'
dependency 'SBJson' dependency 'SBJson'
target :debug do
dependency 'CocoaLumberjack'
end
target :test, :exclusive => true do
dependency 'Kiwi'
end
...@@ -99,10 +99,15 @@ module Pod ...@@ -99,10 +99,15 @@ module Pod
end end
xcconfig.merge!('USER_HEADER_SEARCH_PATHS' => user_header_search_paths.sort.uniq.join(" ")) xcconfig.merge!('USER_HEADER_SEARCH_PATHS' => user_header_search_paths.sort.uniq.join(" "))
prefix_file = @xcodeproj.files.new('path' => prefix_header_filename) # Add all the target related support files to the group, even the copy
prefix_file.group = @xcodeproj.pods.groups.find { |child| child.name == "Supporting Files" } # resources script although the project doesn't actually use them.
support_files_group = @xcodeproj.groups.find do |group|
xcconfig_file = @xcodeproj.files.new("path" => xcconfig_filename) 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| @target.buildConfigurations.each do |config|
config.baseConfiguration = xcconfig_file config.baseConfiguration = xcconfig_file
config.buildSettings['GCC_PREFIX_HEADER'] = prefix_header_filename config.buildSettings['GCC_PREFIX_HEADER'] = prefix_header_filename
...@@ -144,6 +149,8 @@ module Pod ...@@ -144,6 +149,8 @@ module Pod
group.children.new('path' => path.to_s) group.children.new('path' => path.to_s)
end end
end end
# Add a group to hold all the target support files
xcodeproj.main_group.groups.new('name' => 'Targets Support Files')
end end
@xcodeproj @xcodeproj
end end
......
...@@ -204,11 +204,16 @@ module Pod ...@@ -204,11 +204,16 @@ module Pod
end end
def files 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 end
def source_files 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 end
def groups def groups
......
...@@ -35,18 +35,9 @@ ...@@ -35,18 +35,9 @@
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
518ACD451446050200F6BE80 /* Supporting Files */ = {
isa = PBXGroup;
children = (
);
name = "Supporting Files";
path = Pods;
sourceTree = "<group>";
};
518ACD5B1446449B00F6BE80 /* Pods */ = { 518ACD5B1446449B00F6BE80 /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
518ACD451446050200F6BE80 /* Supporting Files */,
); );
name = Pods; name = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
......
...@@ -35,18 +35,9 @@ ...@@ -35,18 +35,9 @@
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
515B0FBB141D52E0001DC3E6 /* Supporting Files */ = {
isa = PBXGroup;
children = (
);
name = "Supporting Files";
path = Pods;
sourceTree = "<group>";
};
515B0FC9141D5FBE001DC3E6 /* Pods */ = { 515B0FC9141D5FBE001DC3E6 /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
515B0FBB141D52E0001DC3E6 /* Supporting Files */,
); );
name = Pods; name = Pods;
sourceTree = "<group>"; 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