Skip to content

Commit

Permalink
Merge pull request #11 from venmo/marklarr/aggregate_targets_2
Browse files Browse the repository at this point in the history
Allow all abstract targets to have build settings changed
  • Loading branch information
marklarr committed May 29, 2014
2 parents 79a82e8 + 2fc4fe4 commit 4bdb956
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/synx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "synx/pbx_file_reference"
require "synx/pbx_group"
require "synx/abstract_object"
require "synx/pbx_native_target"
require "synx/abstract_target"
require "synx/pbx_variant_group"
require "synx/tabber"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Xcodeproj
class Project
module Object
class PBXNativeTarget
class AbstractTarget

def each_build_settings
build_configurations.each { |bc| yield bc.build_settings }
Expand Down
36 changes: 36 additions & 0 deletions spec/dummy/dummy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
objectVersion = 46;
objects = {

/* Begin PBXAggregateTarget section */
8CDA046A1937DDAA004435A1 /* Aggregate Target */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 8CDA046D1937DDAA004435A1 /* Build configuration list for PBXAggregateTarget "Aggregate Target" */;
buildPhases = (
);
dependencies = (
);
name = "Aggregate Target";
productName = "Aggregate Target";
};
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
8C2DEB7F191D3F5C003A1F44 /* ManyFiles.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C2DEB7E191D3F5C003A1F44 /* ManyFiles.m */; };
8C2DEB82191D3F68003A1F44 /* Wow.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C2DEB81191D3F68003A1F44 /* Wow.m */; };
Expand Down Expand Up @@ -303,6 +316,7 @@
targets = (
8C848C47190DB9B300E9727B /* dummy */,
8C848C57190DB9B300E9727B /* dummyTests */,
8CDA046A1937DDAA004435A1 /* Aggregate Target */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -492,6 +506,20 @@
};
name = Release;
};
8CDA046B1937DDAA004435A1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
8CDA046C1937DDAA004435A1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -522,6 +550,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8CDA046D1937DDAA004435A1 /* Build configuration list for PBXAggregateTarget "Aggregate Target" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8CDA046B1937DDAA004435A1 /* Debug */,
8CDA046C1937DDAA004435A1 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */

/* Begin XCVersionGroup section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<key>primary</key>
<true/>
</dict>
<key>8CDA046A1937DDAA004435A1</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
2 changes: 1 addition & 1 deletion spec/synx/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def expected_group_structure
end

# dummyTests target
DUMMY_SYNX_TEST_PROJECT.targets.last.each_build_settings do |bs|
DUMMY_SYNX_TEST_PROJECT.targets[1].each_build_settings do |bs|
expect(bs["GCC_PREFIX_HEADER"]).to eq("dummyTests/Supporting Files/dummyTests-Prefix.pch")
expect(bs["INFOPLIST_FILE"]).to eq("dummyTests/Supporting Files/dummyTests-Info.plist")
end
Expand Down

0 comments on commit 4bdb956

Please sign in to comment.