Commit b4715c23 authored by Eloy Duran's avatar Eloy Duran

Remove ability to specify link_with and platform through TargetDefintion…

Remove ability to specify link_with and platform through TargetDefintion options, for now. As Platform takes an options hash too, this was becoming a bit messy.
parent 6854a011
......@@ -24,15 +24,6 @@ end
_NOTE: As you can see it can take either one target name, or an array of names._
Alternatively, you can also specify the target to link with in the target
options like so:
```ruby
target :test, :exclusive => true, :link_with => 'TestRunnerTarget' do
dependency 'Kiwi'
end
```
If no explicit target is specified, then the Pods target will be linked with
the first target in your project. So if you only have one target you do not
need to specify the target to link with.
......
* For now, remove ability to set things like link_with and platform through the target options.
* Resolve all dependencies together and write out all dependencies to Podfile.lock together.
* Add integration spec with multiple platforms.
* Add multiple-platforms section to changelog.
* Validate platforms for each target definition.
* Validate that there are dependencies in a Podfile.
* Validate that the dependencies in the targets don't conflict. E.g. two different versions of the same pod.
......
......@@ -7,7 +7,7 @@ module Pod
def initialize(name, options = {})
@name, @target_dependencies = name, []
options.each { |k, v| send("#{k}=", v) }
@parent, @exclusive = options.values_at(:parent, :exclusive)
end
# A target is automatically `exclusive` if the `platform` does not match
......@@ -115,11 +115,6 @@ module Pod
#
# # Link with the targets in the user’s project called ‘MyApp’ and ‘MyOtherApp’.
# link_with ['MyApp', 'MyOtherApp']
#
# # You can also specify this inline when specifying a new Pods target:
# target :test, :exclusive => true, :link_with => 'TestRunner' do
# dependency 'Kiwi'
# end
def link_with(targets)
@target_definition.link_with = targets
end
......
......@@ -10,7 +10,8 @@ describe Pod::Installer::UserProjectIntegrator do
link_with 'SampleProject' # this is an app target!
dependency 'JSONKit'
target :test_runner, :exclusive => true, :link_with => 'TestRunner' do
target :test_runner, :exclusive => true do
link_with 'TestRunner'
dependency 'Kiwi'
end
end
......
......@@ -6,7 +6,8 @@ describe Pod::Installer::TargetInstaller do
before do
platform = Pod::Platform.ios
@target_definition = Pod::Podfile::TargetDefinition.new(:foo, :platform => platform)
@target_definition = Pod::Podfile::TargetDefinition.new(:foo)
@target_definition.platform = platform
@podfile = stub('podfile', :platform => platform,
:generate_bridge_support? => false,
:set_arc_compatibility_flag? => false)
......
......@@ -7,7 +7,8 @@ describe Pod::Installer::UserProjectIntegrator do
@podfile = Pod::Podfile.new do
platform :ios
dependency 'JSONKit'
target :test_runner, :exclusive => true, :link_with => 'TestRunner' do
target :test_runner, :exclusive => true do
link_with 'TestRunner'
dependency 'Kiwi'
end
end
......
......@@ -80,14 +80,17 @@ describe "Pod::Podfile" do
dependency 'SSZipArchive'
end
target :test, :exclusive => true, :link_with => 'TestRunner' do
target :test, :exclusive => true do
link_with 'TestRunner'
dependency 'JSONKit'
target :subtarget do
dependency 'Reachability'
end
end
target :osx_target, :platform => :osx, :link_with => 'OSXTarget' do
target :osx_target do
platform :osx
link_with 'OSXTarget'
dependency 'ASIHTTPRequest'
target :nested_osx_target do
end
......
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