Commit bb55c0a3 authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Renamed Target#target to native_target

This should make it more intuitive why we have to navigate there.
parent 17a5f930
...@@ -69,7 +69,7 @@ module Pod ...@@ -69,7 +69,7 @@ module Pod
# process. # process.
# #
def target def target
library.target library.native_target
end end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -418,7 +418,7 @@ module Pod ...@@ -418,7 +418,7 @@ module Pod
pod_targets.sort_by(&:name).each do |pod_target| pod_targets.sort_by(&:name).each do |pod_target|
pod_target.file_accessors.each do |file_accessor| pod_target.file_accessors.each do |file_accessor|
file_accessor.spec_consumer.frameworks.each do |framework| file_accessor.spec_consumer.frameworks.each do |framework|
pod_target.target.add_system_framework(framework) pod_target.native_target.add_system_framework(framework)
end end
end end
end end
...@@ -428,7 +428,7 @@ module Pod ...@@ -428,7 +428,7 @@ module Pod
def set_target_dependencies def set_target_dependencies
aggregate_targets.each do |aggregate_target| aggregate_targets.each do |aggregate_target|
aggregate_target.pod_targets.each do |pod_target| aggregate_target.pod_targets.each do |pod_target|
aggregate_target.target.add_dependency(pod_target.target) aggregate_target.native_target.add_dependency(pod_target.native_target)
pod_target.dependencies.each do |dep| pod_target.dependencies.each do |dep|
unless dep == pod_target.pod_name unless dep == pod_target.pod_name
...@@ -437,7 +437,7 @@ module Pod ...@@ -437,7 +437,7 @@ module Pod
unless pod_dependency_target unless pod_dependency_target
puts "[BUG] DEP: #{dep}" puts "[BUG] DEP: #{dep}"
end end
pod_target.target.add_dependency(pod_dependency_target.target) pod_target.native_target.add_dependency(pod_dependency_target.native_target)
end end
end end
end end
......
...@@ -52,7 +52,7 @@ module Pod ...@@ -52,7 +52,7 @@ module Pod
# @return [PBXNativeTarget] the target generated in the Pods project for # @return [PBXNativeTarget] the target generated in the Pods project for
# this library. # this library.
# #
attr_accessor :target attr_accessor :native_target
# @return [Platform] the platform for this library. # @return [Platform] the platform for this library.
# #
......
...@@ -64,7 +64,7 @@ module Pod ...@@ -64,7 +64,7 @@ module Pod
it 'returns the native target' do it 'returns the native target' do
target = stub target = stub
@lib.target = target @lib.native_target = target
@rep.target.should == target @rep.target.should == target
end end
......
...@@ -109,7 +109,7 @@ module Pod ...@@ -109,7 +109,7 @@ module Pod
it 'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default' do it 'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default' do
@installer.install! @installer.install!
@installer.library.target.build_configurations.each do |config| @installer.library.native_target.build_configurations.each do |config|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should.be.nil config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should.be.nil
end end
end end
...@@ -166,7 +166,7 @@ module Pod ...@@ -166,7 +166,7 @@ module Pod
it 'creates a dummy source to ensure the creation of a single base library' do it 'creates a dummy source to ensure the creation of a single base library' do
@installer.install! @installer.install!
build_files = @installer.library.target.source_build_phase.files build_files = @installer.library.native_target.source_build_phase.files
build_file = build_files.find { |bf| bf.file_ref.path.include?('Pods-dummy.m') } build_file = build_files.find { |bf| bf.file_ref.path.include?('Pods-dummy.m') }
build_file.should.be.not.nil build_file.should.be.not.nil
build_file.file_ref.path.should == 'Pods-dummy.m' build_file.file_ref.path.should == 'Pods-dummy.m'
......
...@@ -88,7 +88,7 @@ module Pod ...@@ -88,7 +88,7 @@ module Pod
it 'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default' do it 'does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default' do
@installer.install! @installer.install!
@installer.library.target.build_configurations.each do |config| @installer.library.native_target.build_configurations.each do |config|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should.be.nil config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should.be.nil
end end
end end
...@@ -97,7 +97,7 @@ module Pod ...@@ -97,7 +97,7 @@ module Pod
it 'adds the source files of each pod to the target of the Pod library' do it 'adds the source files of each pod to the target of the Pod library' do
@installer.install! @installer.install!
names = @installer.library.target.source_build_phase.files.map { |bf| bf.file_ref.display_name } names = @installer.library.native_target.source_build_phase.files.map { |bf| bf.file_ref.display_name }
names.should.include('Banana.m') names.should.include('Banana.m')
end end
...@@ -142,7 +142,7 @@ module Pod ...@@ -142,7 +142,7 @@ module Pod
it 'creates a dummy source to ensure the compilation of libraries with only categories' do it 'creates a dummy source to ensure the compilation of libraries with only categories' do
@installer.install! @installer.install!
build_files = @installer.library.target.source_build_phase.files build_files = @installer.library.native_target.source_build_phase.files
build_file = build_files.find { |bf| bf.file_ref.display_name == 'Pods-BananaLib-dummy.m' } build_file = build_files.find { |bf| bf.file_ref.display_name == 'Pods-BananaLib-dummy.m' }
build_file.should.be.not.nil build_file.should.be.not.nil
build_file.file_ref.path.should == 'Pods-BananaLib-dummy.m' build_file.file_ref.path.should == 'Pods-BananaLib-dummy.m'
...@@ -161,7 +161,7 @@ module Pod ...@@ -161,7 +161,7 @@ module Pod
@installer.library.target_definition.stubs(:inhibits_warnings_for_pod?).returns(true) @installer.library.target_definition.stubs(:inhibits_warnings_for_pod?).returns(true)
@installer.install! @installer.install!
dtrace_files = @installer.library.target.source_build_phase.files.reject do|sf| dtrace_files = @installer.library.native_target.source_build_phase.files.reject do |sf|
!(File.extname(sf.file_ref.path) == '.d') !(File.extname(sf.file_ref.path) == '.d')
end end
dtrace_files.each do |dt| dtrace_files.each do |dt|
......
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