cocoapods-spm 0.1.10 → 0.1.11
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 +4 -4
- data/lib/cocoapods-spm/command/macro/fetch.rb +1 -0
- data/lib/cocoapods-spm/command/macro/prebuild.rb +1 -0
- data/lib/cocoapods-spm/command/spm.rb +1 -0
- data/lib/cocoapods-spm/config/pod.rb +4 -0
- data/lib/cocoapods-spm/config/project.rb +2 -0
- data/lib/cocoapods-spm/config/spm.rb +5 -8
- data/lib/cocoapods-spm/def/podfile.rb +2 -1
- data/lib/cocoapods-spm/def/spm_package.rb +11 -0
- data/lib/cocoapods-spm/helpers/path.rb +10 -0
- data/lib/cocoapods-spm/hooks/post_integrate/05.update_settings.rb +2 -1
- data/lib/cocoapods-spm/macro/config.rb +5 -0
- data/lib/cocoapods-spm/macro/prebuilder.rb +14 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c3b50f5ee1f6aac5f97a26a629a3db6e979d9d3f64d23d8b0ad09efb64b65a8
|
4
|
+
data.tar.gz: f9a36254b07ad0a945a4f74a408f86e5c64061401b1313d1176a6cf6d9a3b961
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9129545f35676f21d34e904e5517b3a05d0fc18eaff8ca0e9fa3045d97d965ab61f7f0c07428df4e663a482d585de920e499f04d2cd76f5732f323295f1ae86b
|
7
|
+
data.tar.gz: 16461e45669ff05d949264c52dfd7b820e562ed5fd8096d86593e07c2a9f4fdb974e22923bc8f79c22d79d95b68c6573317c51a8fe0353862bf1aa1b8e85608a
|
@@ -1,6 +1,10 @@
|
|
1
|
+
require "cocoapods-spm/helpers/path"
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
module SPM
|
3
5
|
class Config
|
6
|
+
include PathMixn
|
7
|
+
|
4
8
|
module SPMConfigMixin
|
5
9
|
def spm_config
|
6
10
|
Config.instance
|
@@ -61,7 +65,7 @@ module Pod
|
|
61
65
|
end
|
62
66
|
|
63
67
|
def root_dir
|
64
|
-
@root_dir ||=
|
68
|
+
@root_dir ||= prepare_dir(Pod::Config.instance.installation_root / ".spm.pods")
|
65
69
|
end
|
66
70
|
|
67
71
|
def pkg_root_dir
|
@@ -99,13 +103,6 @@ module Pod
|
|
99
103
|
def pkg_metadata_dir
|
100
104
|
@pkg_metadata_dir ||= prepare_dir(pkg_root_dir / "metadata")
|
101
105
|
end
|
102
|
-
|
103
|
-
private
|
104
|
-
|
105
|
-
def prepare_dir(dir)
|
106
|
-
dir.mkpath
|
107
|
-
dir
|
108
|
-
end
|
109
106
|
end
|
110
107
|
end
|
111
108
|
end
|
@@ -18,7 +18,8 @@ module Pod
|
|
18
18
|
macro = requirements[0].delete(:macro) if requirements.first.is_a?(Hash)
|
19
19
|
macro ||= {}
|
20
20
|
unless macro.empty?
|
21
|
-
|
21
|
+
macro_dir = prepare_macro_pod_dir(name, macro)
|
22
|
+
requirements[0][:path] = macro_dir.relative_path_from(Pod::Config.instance.installation_root).to_s
|
22
23
|
macro_pods[name] = macro
|
23
24
|
end
|
24
25
|
origin_pod(name, *requirements)
|
@@ -22,6 +22,7 @@ module Pod
|
|
22
22
|
@relative_path = relative_path_from(options)
|
23
23
|
@requirement = requirement_from(options)
|
24
24
|
@linking_opts = options[:linking] || {}
|
25
|
+
validate!
|
25
26
|
end
|
26
27
|
|
27
28
|
def slug
|
@@ -86,6 +87,16 @@ module Pod
|
|
86
87
|
|
87
88
|
private
|
88
89
|
|
90
|
+
def validate!
|
91
|
+
if use_default_xcode_linking? # rubocop:disable Style/GuardClause
|
92
|
+
UI.warn <<~HEREDOC
|
93
|
+
The option :use_default_xcode_linking in the following declaration is deprecated:
|
94
|
+
#{@_options}
|
95
|
+
You are recommended to omit this option in `spm_pkg`.
|
96
|
+
HEREDOC
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
89
100
|
def requirement_from(options)
|
90
101
|
return if @relative_path
|
91
102
|
|
@@ -13,7 +13,8 @@ module Pod
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def macro_plugin_flag_by_config
|
16
|
-
|
16
|
+
prebuild_root_dir = spm_config.macro_prebuilt_root_dir.relative_path_from(pod_config.installation_root)
|
17
|
+
path_prefix = "${PODS_ROOT}/../#{prebuild_root_dir}"
|
17
18
|
@macro_plugin_flag_by_config ||= begin
|
18
19
|
hash = user_build_configurations.keys.to_h do |config|
|
19
20
|
flags = macro_pods.keys.map do |name|
|
@@ -2,6 +2,7 @@ module Pod
|
|
2
2
|
module SPM
|
3
3
|
module MacroConfigMixin
|
4
4
|
include Config::Mixin
|
5
|
+
include PathMixn
|
5
6
|
|
6
7
|
def macro_downloaded_dir
|
7
8
|
spm_config.macro_downloaded_root_dir / name
|
@@ -11,6 +12,10 @@ module Pod
|
|
11
12
|
@macro_dir ||= spm_config.macro_root_dir / name
|
12
13
|
end
|
13
14
|
|
15
|
+
def macro_scratch_dir
|
16
|
+
@macro_scratch_dir ||= prepare_dir(spm_config.macro_root_dir / ".build")
|
17
|
+
end
|
18
|
+
|
14
19
|
def macro_prebuilt_dir
|
15
20
|
spm_config.macro_prebuilt_root_dir / name
|
16
21
|
end
|
@@ -28,14 +28,23 @@ module Pod
|
|
28
28
|
end
|
29
29
|
|
30
30
|
UI.section "Building macro implementation: #{impl_module_name} (#{config})...".green do
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
swift! ["--version"]
|
32
|
+
swift! [
|
33
|
+
"build",
|
34
|
+
"-c", config,
|
35
|
+
"--product", impl_module_name,
|
36
|
+
"--package-path", macro_downloaded_dir,
|
37
|
+
"--scratch-path", macro_scratch_dir,
|
38
|
+
]
|
39
|
+
# Workaround: When building a macro, the debug.yaml under the scratch dir contains some corrupted info,
|
40
|
+
# causing the following failure when building the next macro:
|
41
|
+
# No target named 'OrcamImpl-debug.exe' in build description
|
42
|
+
# Idk what this file is for, but deleting it helps
|
43
|
+
macro_scratch_dir.glob("*.yaml").each { |p| p.delete if p.exist? }
|
35
44
|
end
|
36
45
|
|
37
46
|
prebuilt_binary.parent.mkpath
|
38
|
-
macro_downloaded_build_config_dir =
|
47
|
+
macro_downloaded_build_config_dir = macro_scratch_dir / config
|
39
48
|
macro_build_binary_file_path = macro_downloaded_build_config_dir / impl_module_name
|
40
49
|
unless macro_build_binary_file_path.exist?
|
41
50
|
macro_build_binary_file_path = macro_downloaded_build_config_dir / "#{impl_module_name}-tool"
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thuyen Trinh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/cocoapods-spm/executables.rb
|
55
55
|
- lib/cocoapods-spm/helpers/io.rb
|
56
56
|
- lib/cocoapods-spm/helpers/patch.rb
|
57
|
+
- lib/cocoapods-spm/helpers/path.rb
|
57
58
|
- lib/cocoapods-spm/hooks/base.rb
|
58
59
|
- lib/cocoapods-spm/hooks/helpers/update_script.rb
|
59
60
|
- lib/cocoapods-spm/hooks/post_integrate/01.add_spm_pkgs.rb
|