cocoapods-spm 0.1.15 → 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: b4c8cfc44221acd450d4ab322792cc89a99fc46fcaeeaa750ed98ec23945ab4e
4
- data.tar.gz: 9006ca077f16980c9c738b8dfa40ba1624b1ca387e7049fb9fa3b0db8aa99f13
3
+ metadata.gz: 764bb9ac7c4e7ca71bd30d1abdd9b617a026f921b9ab4c1ac0c87bc5cfbd67d1
4
+ data.tar.gz: 15990b7e1ee3e05ecd25af731acd06e13c1de72140291896fa38826213593c6e
5
5
  SHA512:
6
- metadata.gz: 0e0a9bb08bb34ad8367597401aad718243fdac370601850fde8e3bb46ad5ca502a42bfb56558c6623c0b189c008bd1641462d84a9ef82b78b60044c47e736dab
7
- data.tar.gz: ba9bb4b5e0a8a90f903924ec938fa69b96feca40b59c3658563290061dbe8ecd7b738559b48396e56174ce2bca69261be78eb568cc36de21625146b9d2af9954
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|
@@ -71,7 +71,7 @@ module Pod
71
71
  end
72
72
 
73
73
  def linker_flags_for(target)
74
- return [] if !target.is_a?(Pod::AggregateTarget) && target.build_as_static?
74
+ return [] if target.is_a?(Pod::PodTarget) && target.build_as_static?
75
75
 
76
76
  @spm_resolver.result.linker_flags_for(target)
77
77
  end
@@ -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
- @result.spm_dependencies_by_target[spec.name] = spec.spm_dependencies
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.15
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-03-16 00:00:00.000000000 Z
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