cocoapods-mapfile 0.2.7.0 → 0.2.7.1
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/hmap/command/hmap_writer.rb +1 -1
- data/lib/hmap/gem_version.rb +1 -1
- data/lib/hmap/xc/target/target.rb +47 -35
- data/lib/hmap/xc/target/target_helper.rb +1 -1
- data/lib/hmap/xc/target/target_vfs.rb +4 -0
- data/lib/hmap/xc/workspace/project_helper.rb +16 -7
- data/lib/hmap/xc/workspace/workspace.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaaa78e71fbc30aa040f8a0ad7d14ad0af6691a406e40a1002119c8b39a06f7c
|
4
|
+
data.tar.gz: 790ac93ec756eb422472df923f99d4d706638b69141ccd43e84a515cac42cdad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bca57920f0d2ef6bc29aa611c221c1e1b1f86e95abf4ac2225fa160dd44a51456a3ba4044202dde4088994d663bb30c2ed02f640947e8e825cc7e7264de63d7
|
7
|
+
data.tar.gz: eb3623e1250bbf2d1ae177aaf819735cd410fb43eba476727350fc0ed6d662bd8e6bc03b51e38b4377f45c665d953622fc6bf04aff9d091b92274bbf1ebe309d
|
data/lib/hmap/gem_version.rb
CHANGED
@@ -9,11 +9,13 @@ module HMap
|
|
9
9
|
include HMap::Target::Helper
|
10
10
|
|
11
11
|
attr_reader :entrys, :target, :project
|
12
|
+
attr_accessor :xcconfig_paths
|
12
13
|
|
13
14
|
def initialize(entrys, target, project)
|
14
15
|
@entrys = entrys || []
|
15
16
|
@target = target
|
16
17
|
@project = project
|
18
|
+
@xcconfig_paths = []
|
17
19
|
end
|
18
20
|
|
19
21
|
def platforms
|
@@ -27,53 +29,63 @@ module HMap
|
|
27
29
|
end
|
28
30
|
|
29
31
|
def save_hmap_settings!
|
30
|
-
|
32
|
+
build_setting_paths.each do |path|
|
31
33
|
settings = Constants.instance.hmap_build_settings
|
32
34
|
XcodeprojHelper.new(path).add_build_settings_and_save(settings, use_origin: Resolver.instance.use_origin)
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
36
38
|
def remove_hmap_settings!
|
37
|
-
|
39
|
+
build_setting_paths.each { |path| HMap::XcodeprojHelper.new(path).remove_build_settings_and_save }
|
38
40
|
end
|
39
41
|
|
40
42
|
private
|
41
43
|
|
42
|
-
def
|
43
|
-
return @
|
44
|
+
def build_setting_paths
|
45
|
+
return @build_setting_paths if defined?(@build_setting_paths)
|
44
46
|
|
45
|
-
@
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
s_path = PBXHelper.group_paths(bcr)
|
50
|
-
x = bcr.instance_variable_get('@simple_attributes_hash')['path'] || ''
|
51
|
-
path = File.expand_path(File.join(project.project_dir, s_path, x))
|
52
|
-
xc = XCConfig.new(path)
|
53
|
-
inc = xc.includes_paths
|
54
|
-
path if inc.empty? || project.workspace.xcconfig_paths.none? { |pa| inc.include?(pa) }
|
55
|
-
end
|
56
|
-
end
|
47
|
+
@build_setting_paths = xcconfig_paths.map do |path|
|
48
|
+
xc = XCConfig.new(path)
|
49
|
+
inc = xc.includes_paths
|
50
|
+
path if inc.empty? || project.workspace.xcconfig_paths.none? { |pa| inc.include?(pa) }
|
57
51
|
end.compact
|
58
|
-
|
59
|
-
# @xcconfig_paths = target.build_configuration_list.build_configurations.flat_map do |configuration|
|
60
|
-
# if configuration.is_a?(Constants::XCBuildConfiguration)
|
61
|
-
# bcr = configuration.base_configuration_reference
|
62
|
-
# # if bcr.nil?
|
63
|
-
# # ab_path = Pathname(project.project_dir + "hmap-#{target_name}.#{configuration.name}.xcconfig")
|
64
|
-
# # File.new(ab_path, 'w') unless ab_path.exist?
|
65
|
-
# # xc_ref = target.project.new_file(ab_path)
|
66
|
-
# # configuration.base_configuration_reference = xc_ref
|
67
|
-
# # target.project.save
|
68
|
-
# # ab_path
|
69
|
-
# # else
|
70
|
-
# unless bcr.nil?
|
71
|
-
# s_path = PBXHelper.group_paths(bcr)
|
72
|
-
# x = bcr.instance_variable_get('@simple_attributes_hash')['path'] || ''
|
73
|
-
# File.expand_path File.join(project.project_dir, s_path, x)
|
74
|
-
# end
|
75
|
-
# end
|
76
|
-
# end.compact
|
77
52
|
end
|
53
|
+
|
54
|
+
# def xcconfig_paths
|
55
|
+
# return @xcconfig_paths if defined?(@xcconfig_paths)
|
56
|
+
|
57
|
+
# @xcconfig_paths = target.build_configurations.flat_map do |configuration|
|
58
|
+
# if configuration.is_a?(Constants::XCBuildConfiguration)
|
59
|
+
# bcr = configuration.base_configuration_reference
|
60
|
+
# unless bcr.nil?
|
61
|
+
# s_path = PBXHelper.group_paths(bcr)
|
62
|
+
# x = bcr.instance_variable_get('@simple_attributes_hash')['path'] || ''
|
63
|
+
# path = File.expand_path(File.join(project.project_dir, s_path, x))
|
64
|
+
# xc = XCConfig.new(path)
|
65
|
+
# inc = xc.includes_paths
|
66
|
+
# path if inc.empty? || project.workspace.xcconfig_paths.none? { |pa| inc.include?(pa) }
|
67
|
+
# end
|
68
|
+
# end
|
69
|
+
# end.compact
|
70
|
+
|
71
|
+
# @xcconfig_paths = target.build_configuration_list.build_configurations.flat_map do |configuration|
|
72
|
+
# if configuration.is_a?(Constants::XCBuildConfiguration)
|
73
|
+
# bcr = configuration.base_configuration_reference
|
74
|
+
# # if bcr.nil?
|
75
|
+
# # ab_path = Pathname(project.project_dir + "hmap-#{target_name}.#{configuration.name}.xcconfig")
|
76
|
+
# # File.new(ab_path, 'w') unless ab_path.exist?
|
77
|
+
# # xc_ref = target.project.new_file(ab_path)
|
78
|
+
# # configuration.base_configuration_reference = xc_ref
|
79
|
+
# # target.project.save
|
80
|
+
# # ab_path
|
81
|
+
# # else
|
82
|
+
# unless bcr.nil?
|
83
|
+
# s_path = PBXHelper.group_paths(bcr)
|
84
|
+
# x = bcr.instance_variable_get('@simple_attributes_hash')['path'] || ''
|
85
|
+
# File.expand_path File.join(project.project_dir, s_path, x)
|
86
|
+
# end
|
87
|
+
# end
|
88
|
+
# end.compact
|
89
|
+
# end
|
78
90
|
end
|
79
91
|
end
|
@@ -94,7 +94,7 @@ module HMap
|
|
94
94
|
def build_dir
|
95
95
|
return @build_dir if defined?(@build_dir)
|
96
96
|
|
97
|
-
b_d =
|
97
|
+
b_d = build_setting_paths.none? { |path| XCConfig.new(path).attributes[Constants::CONFIGURATION_BUILD_DIR].nil? }
|
98
98
|
@build_dir = target_name if b_d
|
99
99
|
end
|
100
100
|
|
@@ -9,11 +9,20 @@ module HMap
|
|
9
9
|
define_method(:all_product_headers) do
|
10
10
|
return @all_product_headers if defined? @all_product_headers
|
11
11
|
|
12
|
-
|
12
|
+
hs = targets.each_with_object({}) do |target, sum|
|
13
13
|
next if target.all_product_headers.nil?
|
14
14
|
|
15
15
|
sum.merge!(target.all_product_headers) { |_, oldval, newval| newval + oldval }
|
16
16
|
end
|
17
|
+
|
18
|
+
if targets.any?(&:app_target?)
|
19
|
+
workspace.projects.each do |pr|
|
20
|
+
next if pr == self
|
21
|
+
|
22
|
+
hs.merge!(pr.all_product_headers) { |_, v1, v2| v1 + v2 }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
@all_product_headers = hs
|
17
26
|
end
|
18
27
|
|
19
28
|
define_method(:all_non_framework_target_headers) do
|
@@ -37,13 +46,13 @@ module HMap
|
|
37
46
|
hs = targets.inject({}) do |sum, entry|
|
38
47
|
sum.merge!(entry.project_headers) { |_, v1, _| v1 }
|
39
48
|
end
|
40
|
-
|
41
|
-
|
42
|
-
|
49
|
+
if targets.any?(&:app_target?)
|
50
|
+
workspace.projects.each do |pr|
|
51
|
+
next if pr == self
|
43
52
|
|
44
|
-
|
45
|
-
|
46
|
-
|
53
|
+
hs.merge!(pr.project_headers) { |_, v1, _| v1 }
|
54
|
+
end
|
55
|
+
end
|
47
56
|
@project_headers = project_entrys.inject(hs) do |sum, entry|
|
48
57
|
sum.merge!(entry.project_buckets_extra) { |_, v1, _| v1 }
|
49
58
|
end
|
@@ -96,7 +96,9 @@ module HMap
|
|
96
96
|
|
97
97
|
s_path = PBXHelper.group_paths(bcr)
|
98
98
|
x = bcr.instance_variable_get('@simple_attributes_hash')['path'] || ''
|
99
|
-
File.expand_path(File.join(project.project_dir, s_path, x))
|
99
|
+
path = File.expand_path(File.join(project.project_dir, s_path, x))
|
100
|
+
target.xcconfig_paths << path
|
101
|
+
path
|
100
102
|
end.compact
|
101
103
|
end
|
102
104
|
end.uniq
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-mapfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.7.
|
4
|
+
version: 0.2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cat1237
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|