cocoapods-spm 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 764bb9ac7c4e7ca71bd30d1abdd9b617a026f921b9ab4c1ac0c87bc5cfbd67d1
|
4
|
+
data.tar.gz: 15990b7e1ee3e05ecd25af731acd06e13c1de72140291896fa38826213593c6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f39d170b78733247dfdcd69e12dba4c92b764c71e9ad290f8096310588e3d8ce0ca6b511a990f110a6c39154cc1e7c84210f4dcac8d5e2194a15b946def839e
|
7
|
+
data.tar.gz: 2059f70849d1b4eb10fec1fee649376115c0abcf004683fcafc41ff7d2094baa697ff8b5dfa72085836f35528392393d410a88bfba294c5e3bb89d31dfa98327
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Pod
|
2
|
+
class Target
|
3
|
+
class NonLibrary
|
4
|
+
attr_reader :underlying, :spec
|
5
|
+
|
6
|
+
def initialize(underlying: nil, spec: nil)
|
7
|
+
@underlying = underlying
|
8
|
+
@spec = spec
|
9
|
+
end
|
10
|
+
|
11
|
+
def name
|
12
|
+
spec.name
|
13
|
+
end
|
14
|
+
|
15
|
+
def platform
|
16
|
+
underlying.platform
|
17
|
+
end
|
18
|
+
|
19
|
+
def xcconfig_path(variant)
|
20
|
+
# For test spec, return the path as <TargetName>.unit-test.<Config>.xcconfig
|
21
|
+
# Here, we're trying to get `unit-tests` out of the spec, then calling
|
22
|
+
# `underlying.xcconfig_path("unit-tests.debug")` to get the result
|
23
|
+
variant_prefix = underlying.spec_label(spec).sub("#{underlying.name}-", "")
|
24
|
+
underlying.xcconfig_path("#{variant_prefix}.#{variant}")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -82,6 +82,15 @@ module Pod
|
|
82
82
|
proc.call(update_targets, target, setting, config)
|
83
83
|
proc.call(update_pod_targets, target, setting, config)
|
84
84
|
end
|
85
|
+
next unless target.is_a?(PodTarget)
|
86
|
+
|
87
|
+
(target.test_specs + target.app_specs).each do |spec|
|
88
|
+
target_wrapper = Target::NonLibrary.new(underlying: target, spec: spec)
|
89
|
+
target.build_settings.each_key do |config|
|
90
|
+
setting = target.build_settings_for_spec(spec, :configuration => config)
|
91
|
+
proc.call(update_targets, target_wrapper, setting, config)
|
92
|
+
end
|
93
|
+
end
|
85
94
|
end
|
86
95
|
|
87
96
|
aggregate_targets.each do |target|
|
@@ -48,10 +48,11 @@ module Pod
|
|
48
48
|
perform_settings_update(
|
49
49
|
update_targets: lambda do |target, _, _|
|
50
50
|
{
|
51
|
-
|
51
|
+
**derived_data_settings,
|
52
|
+
"SOURCE_PACKAGES_CHECKOUTS_DIR" => "${PROJECT_DERIVED_DATA_DIR}/SourcePackages/checkouts",
|
52
53
|
"FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/PackageFrameworks\"",
|
53
54
|
"LIBRARY_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}\"",
|
54
|
-
"SWIFT_INCLUDE_PATHS" => "$
|
55
|
+
"SWIFT_INCLUDE_PATHS" => "${PODS_CONFIGURATION_BUILD_DIR}",
|
55
56
|
"OTHER_SWIFT_FLAGS" => modulemap_args_for_target(target, prefix: "-Xcc"),
|
56
57
|
"OTHER_CFLAGS" => modulemap_args_for_target(target),
|
57
58
|
"HEADER_SEARCH_PATHS" => header_search_paths_for(target),
|
@@ -61,8 +62,16 @@ module Pod
|
|
61
62
|
)
|
62
63
|
end
|
63
64
|
|
65
|
+
def derived_data_settings
|
66
|
+
{
|
67
|
+
"BUILD_ROOT_TO_DERIVED_DATA_SUFFIX_archive" => "/../../..",
|
68
|
+
"BUILD_ROOT_TO_DERIVED_DATA_SUFFIX_install" => "/../../..",
|
69
|
+
"PROJECT_DERIVED_DATA_DIR" => "${BUILD_ROOT}/../..${BUILD_ROOT_TO_DERIVED_DATA_SUFFIX_${ACTION}}",
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
64
73
|
def linker_flags_for(target)
|
65
|
-
return [] if
|
74
|
+
return [] if target.is_a?(Pod::PodTarget) && target.build_as_static?
|
66
75
|
|
67
76
|
@spm_resolver.result.linker_flags_for(target)
|
68
77
|
end
|
data/lib/cocoapods-spm/main.rb
CHANGED
@@ -8,6 +8,7 @@ require "cocoapods-spm/def/installer"
|
|
8
8
|
require "cocoapods-spm/def/target_definition"
|
9
9
|
require "cocoapods-spm/def/podfile"
|
10
10
|
require "cocoapods-spm/def/spec"
|
11
|
+
require "cocoapods-spm/def/target"
|
11
12
|
require "cocoapods-spm/patch/aggregate_target"
|
12
13
|
require "cocoapods-spm/patch/installer"
|
13
14
|
require "cocoapods-spm/command/spm"
|
@@ -28,7 +28,9 @@ module Pod
|
|
28
28
|
def resolve_dependencies_for_targets
|
29
29
|
specs = @aggregate_targets.flat_map(&:specs).uniq
|
30
30
|
specs.each do |spec|
|
31
|
-
|
31
|
+
deps = spec.spm_dependencies
|
32
|
+
deps += spec.root.spm_dependencies if spec.subspec?
|
33
|
+
@result.spm_dependencies_by_target[spec.name] = deps.uniq
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-spm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thuyen Trinh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- lib/cocoapods-spm/def/spec.rb
|
50
50
|
- lib/cocoapods-spm/def/spm_dependency.rb
|
51
51
|
- lib/cocoapods-spm/def/spm_package.rb
|
52
|
+
- lib/cocoapods-spm/def/target.rb
|
52
53
|
- lib/cocoapods-spm/def/target_definition.rb
|
53
54
|
- lib/cocoapods-spm/def/xcodeproj.rb
|
54
55
|
- lib/cocoapods-spm/executables.rb
|