cocoapods-alexandria 0.1.4 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-alexandria/gem_version.rb +1 -1
- data/lib/cocoapods-alexandria/helper/user_options.rb +6 -0
- data/lib/cocoapods-alexandria/rome/framework_cache.rb +4 -4
- data/lib/cocoapods-alexandria/xcodegen/dependencies_generator.rb +9 -4
- data/lib/cocoapods-alexandria/xcodegen/dependency.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939deeb120d224d7de1d886e55edbe77151f73b6a2d0b083aee075ffc1c9c214
|
4
|
+
data.tar.gz: 1c13e5daec652c151d6d01d8e6c5bccfe2d3d3efda099ae9f70c60e6d6f8f3a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e79bd080912d587bb7ffa66f59da8fc75c7106e30eb40efc9775dbcf48cca63660df71cd74ed4a2d3cedb6dc3229c28c15a3730d49619aaf5f0eb1c86a09f893
|
7
|
+
data.tar.gz: eb4e35e5c6e55efa0412a022e3ca13c00bc1f5911b62910c70ce55870ace98b5a35374864f95ba68330b21b0ecb918f211077d642325150e61ec6878015c5964
|
@@ -3,17 +3,23 @@ module PodAlexandria
|
|
3
3
|
attr_reader :environment_configs
|
4
4
|
attr_reader :force_bitcode
|
5
5
|
attr_reader :xcodegen_dependencies_file
|
6
|
+
attr_reader :do_not_embed_dependencies_in_targets
|
6
7
|
|
7
8
|
def initialize(installer_context, user_options)
|
8
9
|
@environment_configs = user_options.fetch('environment_configs', default_configurations(installer_context))
|
9
10
|
@force_bitcode = user_options.fetch('force_bitcode', true)
|
10
11
|
@xcodegen_dependencies_file = user_options.fetch('xcodegen_dependencies_file', 'projectDependencies.yml')
|
12
|
+
@do_not_embed_dependencies_in_targets = user_options.fetch('do_not_embed_dependencies_in_targets', [])
|
11
13
|
end
|
12
14
|
|
13
15
|
def environment_configs_for(target)
|
14
16
|
environment_configs[normalize_target(target)]
|
15
17
|
end
|
16
18
|
|
19
|
+
def allow_embed_dependencies_for(target)
|
20
|
+
!do_not_embed_dependencies_in_targets.include?(normalize_target(target))
|
21
|
+
end
|
22
|
+
|
17
23
|
private
|
18
24
|
|
19
25
|
def default_configurations(installer_context)
|
@@ -90,12 +90,12 @@ module PodAlexandria
|
|
90
90
|
|
91
91
|
def delete(spec)
|
92
92
|
name = spec_modules[spec] || module_name(spec)
|
93
|
-
|
93
|
+
paths = Dir["#{destination}/#{name}.{framework,xcframework}"]
|
94
94
|
|
95
|
-
if
|
96
|
-
FileUtils.remove_dir(path, true)
|
95
|
+
if !paths.empty?
|
96
|
+
paths.each { |path| FileUtils.remove_dir(path, true) }
|
97
97
|
else
|
98
|
-
Pod::UI.warn "🤔 Could not delete #{
|
98
|
+
Pod::UI.warn "🤔 Could not delete #{destination}/#{name}.(xc)framework, it does not exist! (this is normal for newly added pods)"
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
@@ -6,7 +6,12 @@ module PodAlexandria
|
|
6
6
|
# and also checking if they are linked dynamically or not.
|
7
7
|
def self.generate_dependencies(installer_context, options)
|
8
8
|
targets = installer_context.umbrella_targets.map { |target|
|
9
|
-
generate_for_target(
|
9
|
+
generate_for_target(
|
10
|
+
installer_context,
|
11
|
+
target,
|
12
|
+
options.environment_configs_for(target.cocoapods_target_label),
|
13
|
+
options.allow_embed_dependencies_for(target.cocoapods_target_label)
|
14
|
+
)
|
10
15
|
}.to_h
|
11
16
|
|
12
17
|
File.open(options.xcodegen_dependencies_file, 'w') { |file|
|
@@ -16,7 +21,7 @@ module PodAlexandria
|
|
16
21
|
|
17
22
|
private
|
18
23
|
|
19
|
-
def self.generate_for_target(installer_context, target, configurations)
|
24
|
+
def self.generate_for_target(installer_context, target, configurations, allow_embed)
|
20
25
|
target_name = target.cocoapods_target_label.sub(/^Pods-/, '')
|
21
26
|
xcconfig = config_file_for_target(installer_context, target)
|
22
27
|
|
@@ -24,13 +29,13 @@ module PodAlexandria
|
|
24
29
|
target_name,
|
25
30
|
{
|
26
31
|
'configFiles' => configurations,
|
27
|
-
'dependencies' => get_dependencies_from_xcconfig(xcconfig).map(
|
32
|
+
'dependencies' => get_dependencies_from_xcconfig(xcconfig).map { |d| d.xcodegen_info(allow_embed) }
|
28
33
|
}
|
29
34
|
]
|
30
35
|
end
|
31
36
|
|
32
37
|
def self.config_file_for_target(installer_context, target)
|
33
|
-
Dir["#{installer_context.sandbox_root}/Target Support Files/#{target.cocoapods_target_label}/#{target.cocoapods_target_label}
|
38
|
+
Dir["#{installer_context.sandbox_root}/Target Support Files/#{target.cocoapods_target_label}/#{target.cocoapods_target_label}.*release.xcconfig"]
|
34
39
|
.first
|
35
40
|
end
|
36
41
|
|
@@ -8,11 +8,11 @@ module PodAlexandria
|
|
8
8
|
@module_name = value.delete_prefix('-l').delete_prefix('-f').delete_prefix('-wf')
|
9
9
|
end
|
10
10
|
|
11
|
-
def xcodegen_info
|
11
|
+
def xcodegen_info(allow_embed)
|
12
12
|
if exists?
|
13
13
|
{
|
14
14
|
'framework' => path,
|
15
|
-
'embed' => is_dynamic
|
15
|
+
'embed' => is_dynamic? && allow_embed,
|
16
16
|
'weak' => is_weak?
|
17
17
|
}
|
18
18
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-alexandria
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Jennes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
rubygems_version: 3.0.3
|
100
|
+
rubygems_version: 3.0.3.1
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: Alexandria allows for easier integration with XcodeGen, and automatically
|