Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
2281ae50
Commit
2281ae50
authored
Oct 14, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont embed frameworks in extensions
parent
7a838899
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+21
-0
target_inspection_result.rb
lib/cocoapods/installer/analyzer/target_inspection_result.rb
+4
-0
target_inspector.rb
lib/cocoapods/installer/analyzer/target_inspector.rb
+11
-0
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+3
-0
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
2281ae50
...
...
@@ -74,6 +74,7 @@ module Pod
@result
.
specifications
=
generate_specifications
@result
.
targets
=
generate_targets
@result
.
sandbox_state
=
generate_sandbox_state
verify_extension_bs
@result
end
...
...
@@ -273,6 +274,7 @@ module Pod
target
.
pod_targets
=
pod_targets
.
select
do
|
pod_target
|
pod_target
.
target_definitions
.
include?
(
target_definition
)
end
target
.
embedded_pod_targets
=
target
.
pod_targets
target
end
...
...
@@ -692,6 +694,25 @@ module Pod
end
inspection_result
end
def
verify_extension_bs
inspections
=
Hash
(
@result
.
target_inspections
)
inspections
.
each
do
|
td
,
inspection
|
project
=
Xcodeproj
::
Project
.
open
(
inspection
.
project_path
)
inspection
.
targets_to_embed_in
.
each
do
|
native_target
|
td_for_target
,
inspection_for_target
=
inspections
.
find
{
|
_
,
i
|
i
.
project_target_uuids
.
include?
(
native_target
.
uuid
)
}
at_for_target
=
@result
.
targets
.
find
{
|
at
|
at
.
target_definition
==
td_for_target
}
next
unless
at_for_target
embedded_at
=
@result
.
targets
.
find
{
|
at
|
at
.
target_definition
==
td
}
at_for_target
.
embedded_pod_targets
.
push
(
*
embedded_at
.
pod_targets
)
pod_targets_by_name
=
at_for_target
.
embedded_pod_targets
.
group_by
(
&
:pod_name
)
pod_targets_by_name
.
each
do
|
name
,
pt
|
raise
"duplicate, non-matching pod targets for
#{
name
}
in
#{
embedded_at
.
label
}
"
if
pt
.
size
>
1
end
at_for_target
.
embedded_targets
<<
embedded_at
end
end
end
end
end
end
lib/cocoapods/installer/analyzer/target_inspection_result.rb
View file @
2281ae50
...
...
@@ -16,6 +16,10 @@ module Pod
#
attr_accessor
:project_target_uuids
#
#
attr_accessor
:targets_to_embed_in
# @return [Hash{String=>Symbol}] A hash representing the user build
# configurations where each key corresponds to the name of a
# configuration and its value to its type (`:debug` or
...
...
lib/cocoapods/installer/analyzer/target_inspector.rb
View file @
2281ae50
...
...
@@ -43,6 +43,7 @@ module Pod
result
.
build_configurations
=
compute_build_configurations
(
targets
)
result
.
platform
=
compute_platform
(
targets
)
result
.
archs
=
compute_archs
(
targets
)
result
.
targets_to_embed_in
=
compute_targets_to_embed_in
(
targets
,
user_project
)
result
.
project
=
user_project
result
end
...
...
@@ -170,6 +171,16 @@ module Pod
end
.
compact
.
uniq
.
sort
end
def
compute_targets_to_embed_in
(
user_targets
,
user_project
)
user_targets
.
flat_map
do
|
target
|
user_project
.
native_targets
.
select
do
|
native_target
|
native_target
.
copy_files_build_phases
.
any?
do
|
phase
|
phase
.
files_references
.
include?
(
target
.
product_reference
)
end
end
end
.
uniq
end
# Checks if any of the targets for the {TargetDefinition} computed before
# by #compute_user_project_targets is recommended to be build as a framework
# due the presence of Swift source code in any of the source build phases.
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
2281ae50
...
...
@@ -18,6 +18,7 @@ module Pod
@sandbox
=
sandbox
@pod_targets
=
[]
@search_paths_aggregate_targets
=
[]
@embedded_pod_targets
=
[]
@file_accessors
=
[]
@xcconfigs
=
{}
end
...
...
@@ -109,6 +110,8 @@ module Pod
#
attr_accessor
:search_paths_aggregate_targets
attr_accessor
:embedded_pod_targets
# @param [String] build_configuration The build configuration for which the
# the pod targets should be returned.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment