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
417503d9
Commit
417503d9
authored
Oct 03, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Oct 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7068 from dnkoutso/fix_caching
Fix framework and resources paths caching
parents
eb900a78
98260a5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
41 deletions
+43
-41
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+39
-41
No files found.
CHANGELOG.md
View file @
417503d9
...
@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
Fix framework and resources paths caching
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7068
](
https://github.com/CocoaPods/CocoaPods/pull/7068
)
*
Build subspecs in static frameworks without error
*
Build subspecs in static frameworks without error
[
Paul Beusterien
](
https://github.com/paulb777
)
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7058
](
https://github.com/CocoaPods/CocoaPods/pull/7058
)
[
#7058
](
https://github.com/CocoaPods/CocoaPods/pull/7058
)
...
...
lib/cocoapods/target/pod_target.rb
View file @
417503d9
...
@@ -207,36 +207,35 @@ module Pod
...
@@ -207,36 +207,35 @@ module Pod
# this target depends upon.
# this target depends upon.
#
#
def
framework_paths
(
include_test_spec_paths
=
true
)
def
framework_paths
(
include_test_spec_paths
=
true
)
@framework_paths
||=
Hash
.
new
do
|
h
,
key
|
@framework_paths
||=
{}
h
[
key
]
=
begin
return
@framework_paths
[
include_test_spec_paths
]
if
@framework_paths
.
key?
(
include_test_spec_paths
)
accessors
=
file_accessors
@framework_paths
[
include_test_spec_paths
]
=
begin
accessors
=
accessors
.
reject
{
|
a
|
a
.
spec
.
test_specification?
}
unless
include_test_spec_paths
accessors
=
file_accessors
frameworks
=
[]
accessors
=
accessors
.
reject
{
|
a
|
a
.
spec
.
test_specification?
}
unless
include_test_spec_paths
accessors
.
flat_map
(
&
:vendored_dynamic_artifacts
).
map
do
|
framework_path
|
frameworks
=
[]
relative_path_to_sandbox
=
framework_path
.
relative_path_from
(
sandbox
.
root
)
accessors
.
flat_map
(
&
:vendored_dynamic_artifacts
).
map
do
|
framework_path
|
framework
=
{
:name
=>
framework_path
.
basename
.
to_s
,
relative_path_to_sandbox
=
framework_path
.
relative_path_from
(
sandbox
.
root
)
:input_path
=>
"${PODS_ROOT}/
#{
relative_path_to_sandbox
}
"
,
framework
=
{
:name
=>
framework_path
.
basename
.
to_s
,
:output_path
=>
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/
#{
framework_path
.
basename
}
"
}
:input_path
=>
"${PODS_ROOT}/
#{
relative_path_to_sandbox
}
"
,
# Until this can be configured, assume the dSYM file uses the file name as the framework.
:output_path
=>
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/
#{
framework_path
.
basename
}
"
}
# See https://github.com/CocoaPods/CocoaPods/issues/1698
# Until this can be configured, assume the dSYM file uses the file name as the framework.
dsym_name
=
"
#{
framework_path
.
basename
}
.dSYM"
# See https://github.com/CocoaPods/CocoaPods/issues/1698
dsym_path
=
Pathname
.
new
(
"
#{
framework_path
.
dirname
}
/
#{
dsym_name
}
"
)
dsym_name
=
"
#{
framework_path
.
basename
}
.dSYM"
if
dsym_path
.
exist?
dsym_path
=
Pathname
.
new
(
"
#{
framework_path
.
dirname
}
/
#{
dsym_name
}
"
)
framework
[
:dsym_name
]
=
dsym_name
if
dsym_path
.
exist?
framework
[
:dsym_input_path
]
=
"${PODS_ROOT}/
#{
relative_path_to_sandbox
}
.dSYM"
framework
[
:dsym_name
]
=
dsym_name
framework
[
:dsym_output_path
]
=
"${DWARF_DSYM_FOLDER_PATH}/
#{
dsym_name
}
"
framework
[
:dsym_input_path
]
=
"${PODS_ROOT}/
#{
relative_path_to_sandbox
}
.dSYM"
end
framework
[
:dsym_output_path
]
=
"${DWARF_DSYM_FOLDER_PATH}/
#{
dsym_name
}
"
frameworks
<<
framework
end
end
if
should_build?
&&
requires_frameworks?
&&
!
static_framework?
frameworks
<<
framework
frameworks
<<
{
:name
=>
product_name
,
end
:input_path
=>
build_product_path
(
'${BUILT_PRODUCTS_DIR}'
),
if
should_build?
&&
requires_frameworks?
&&
!
static_framework?
:output_path
=>
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/
#{
product_name
}
"
}
frameworks
<<
{
:name
=>
product_name
,
end
:input_path
=>
build_product_path
(
'${BUILT_PRODUCTS_DIR}'
),
frameworks
:output_path
=>
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/
#{
product_name
}
"
}
end
end
frameworks
end
end
@framework_paths
[
include_test_spec_paths
]
end
end
# Returns the resource paths associated with this target. By default all paths include the resource paths
# Returns the resource paths associated with this target. By default all paths include the resource paths
...
@@ -248,22 +247,21 @@ module Pod
...
@@ -248,22 +247,21 @@ module Pod
# @return [Array<String>] The resource and resource bundle paths this target depends upon.
# @return [Array<String>] The resource and resource bundle paths this target depends upon.
#
#
def
resource_paths
(
include_test_spec_paths
=
true
)
def
resource_paths
(
include_test_spec_paths
=
true
)
@resource_paths
||=
Hash
.
new
do
|
h
,
key
|
@resource_paths
||=
{}
h
[
key
]
=
begin
return
@resource_paths
[
include_test_spec_paths
]
if
@resource_paths
.
key?
(
include_test_spec_paths
)
accessors
=
file_accessors
@resource_paths
[
include_test_spec_paths
]
=
begin
accessors
=
accessors
.
reject
{
|
a
|
a
.
spec
.
test_specification?
}
unless
include_test_spec_paths
accessors
=
file_accessors
resource_paths
=
accessors
.
flat_map
do
|
accessor
|
accessors
=
accessors
.
reject
{
|
a
|
a
.
spec
.
test_specification?
}
unless
include_test_spec_paths
accessor
.
resources
.
flat_map
{
|
res
|
"${PODS_ROOT}/
#{
res
.
relative_path_from
(
sandbox
.
project
.
path
.
dirname
)
}
"
}
resource_paths
=
accessors
.
flat_map
do
|
accessor
|
end
accessor
.
resources
.
flat_map
{
|
res
|
"${PODS_ROOT}/
#{
res
.
relative_path_from
(
sandbox
.
project
.
path
.
dirname
)
}
"
}
resource_bundles
=
accessors
.
flat_map
do
|
accessor
|
end
prefix
=
Generator
::
XCConfig
::
XCConfigHelper
::
CONFIGURATION_BUILD_DIR_VARIABLE
resource_bundles
=
accessors
.
flat_map
do
|
accessor
|
prefix
=
configuration_build_dir
unless
accessor
.
spec
.
test_specification?
prefix
=
Generator
::
XCConfig
::
XCConfigHelper
::
CONFIGURATION_BUILD_DIR_VARIABLE
accessor
.
resource_bundles
.
keys
.
map
{
|
name
|
"
#{
prefix
}
/
#{
name
.
shellescape
}
.bundle"
}
prefix
=
configuration_build_dir
unless
accessor
.
spec
.
test_specification?
end
accessor
.
resource_bundles
.
keys
.
map
{
|
name
|
"
#{
prefix
}
/
#{
name
.
shellescape
}
.bundle"
}
resource_paths
+
resource_bundles
end
end
resource_paths
+
resource_bundles
end
end
@resource_paths
[
include_test_spec_paths
]
end
end
# Returns the corresponding native target to use based on the provided specification.
# Returns the corresponding native target to use based on the provided specification.
...
...
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