cocoapods-jxedt 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-jxedt/binary/config.rb +12 -1
- data/lib/cocoapods-jxedt/binary/helper/podfile_post_install_hook.rb +1 -0
- data/lib/cocoapods-jxedt/binary/pod-room/xcodebuild_command.rb +10 -0
- data/lib/cocoapods-jxedt/binary/targets/pod_target.rb +7 -4
- data/lib/cocoapods-jxedt/command/binary/command/push.rb +7 -2
- data/lib/cocoapods-jxedt/command/header/header.rb +5 -3
- data/lib/cocoapods-jxedt/command/options/options.rb +1 -1
- data/lib/cocoapods-jxedt/gem_version.rb +1 -1
- data/lib/cocoapods-jxedt/git_helper/cache_pucher.rb +1 -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: a6302e970ed73bc5b9e9d1c360b07866274dfef9c17cb525fbf421c18731a0af
|
4
|
+
data.tar.gz: bc7af03bb9f4754d6ad79011b9350f05008a311701236f69f5d8f265a85e1bd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4792210d5b87ea5ed46be38635a2c6851a355c97cc964b59cfb8c35031bb5da0b18f36ac496ce59f031e9108cd469821ea3eb887bb22ecb6cf0b0744ecaaff4f
|
7
|
+
data.tar.gz: ae695a6d13a154a1b5d3f9fb060c1e8aabf346c719a8d5e3c2f76f07d4eb81260550796ef7721730b616090be5d0aaecd6ee726b85e6fbdd13ea51c7fd1aa4ec
|
@@ -18,6 +18,7 @@ module Jxedt
|
|
18
18
|
:xcconfig_configuration_alias => "xcconfig文件中配置多configuration的别名(一定要唯一),用于搜索替换,我们用来支持多configuration的二进制。一般不需要设置,默认值为'cocoapods-jxedt-binary'",
|
19
19
|
:framework_header_search_enabled => "开启binary的组件是否配置HEADER_SEARCH_PATH头文件搜索,兼容头文件引用的问题。默认为false",
|
20
20
|
:silent_build => "静默编译,即不输出编译命令。默认true",
|
21
|
+
:fix_swiftinterface_pods => "修复swiftinterface的bug,即:组件中包含和module name同名的class,使用不同swift编译器编译时报错;需要填写需要修复的组件名称",
|
21
22
|
:configurations => "支持的configuration配置,可以写字符串'Debug'或'Release',也可以写多个'['Debug', 'Release']'。默认为'Release'",
|
22
23
|
:xcframework => "编译结果是否为xcframework。默认false",
|
23
24
|
:clean_build => "编译的时候是否clean build。默认true",
|
@@ -119,6 +120,11 @@ module Jxedt
|
|
119
120
|
@dsl_config[:silent_build] || @dsl_config[:silent_build].nil?
|
120
121
|
end
|
121
122
|
|
123
|
+
def should_fix_swiftinterface_bug?(target_name)
|
124
|
+
@fix_swiftinterface_pods = @dsl_config[:fix_swiftinterface_pods] || []
|
125
|
+
@fix_swiftinterface_pods.include?(target_name)
|
126
|
+
end
|
127
|
+
|
122
128
|
def xcframework?
|
123
129
|
@dsl_config[:xcframework] || false
|
124
130
|
end
|
@@ -201,7 +207,12 @@ module Jxedt
|
|
201
207
|
end
|
202
208
|
|
203
209
|
def git_remote_repo
|
204
|
-
@remote ||=
|
210
|
+
@remote ||= begin
|
211
|
+
remote = cache_repo[:remote]
|
212
|
+
remote.chomp!('/') if remote.is_a?(String) # 去除最后的'/'
|
213
|
+
remote.strip! if remote.is_a?(String) # 去除左右空格、转义字符
|
214
|
+
remote
|
215
|
+
end
|
205
216
|
end
|
206
217
|
|
207
218
|
def cache_repo_enabled?
|
@@ -20,6 +20,7 @@ module Pod
|
|
20
20
|
def handle_pods_project_configurations!(installer)
|
21
21
|
installer.pods_project.targets.each do |target|
|
22
22
|
target.build_configurations.each do |config|
|
23
|
+
config.build_settings["BUILD_LIBRARY_FOR_DISTRIBUTION"] = "YES"
|
23
24
|
config.build_settings["CODE_SIGN_IDENTITY"] = "" if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
|
24
25
|
end
|
25
26
|
end
|
@@ -35,6 +35,16 @@ module Jxedt
|
|
35
35
|
else
|
36
36
|
collect_output(target, Dir[target_products_dir_of(target, sdks[0]) + "/*"])
|
37
37
|
end
|
38
|
+
|
39
|
+
# fix swiftinterface bug
|
40
|
+
if target.defines_module? && Jxedt.config.should_fix_swiftinterface_bug?(target.label)
|
41
|
+
# https://developer.apple.com/forums/thread/123253
|
42
|
+
cmd = "find #{output_path(target)} -name '*.swiftinterface' -exec sed -i -e 's/#{target.product_module_name}\\.//g' {} \\;"
|
43
|
+
`#{cmd}`
|
44
|
+
|
45
|
+
Pod::UI.puts "- Fix Swiftinterface Bug: #{target}".magenta unless Jxedt.config.silent_build?
|
46
|
+
Pod::UI.puts_indented "$ #{cmd}" unless Jxedt.config.silent_build?
|
47
|
+
end
|
38
48
|
end
|
39
49
|
end
|
40
50
|
|
@@ -54,8 +54,6 @@ module Pod
|
|
54
54
|
class BuildSettings
|
55
55
|
# missing framework header search paths
|
56
56
|
def missing_framework_header_search_path(pt)
|
57
|
-
return [] unless pt.frame_header_search_paths_enable?
|
58
|
-
|
59
57
|
paths = []
|
60
58
|
pt.file_accessors.each do |file_accessor|
|
61
59
|
# xcframeworks
|
@@ -123,7 +121,11 @@ module Pod
|
|
123
121
|
alias_method :old_raw_header_search_paths, :_raw_header_search_paths
|
124
122
|
def _raw_header_search_paths
|
125
123
|
header_search_paths = old_raw_header_search_paths
|
126
|
-
header_search_paths.concat pod_targets.flat_map { |pt|
|
124
|
+
header_search_paths.concat pod_targets.flat_map { |pt|
|
125
|
+
search_paths = []
|
126
|
+
search_paths.concat missing_framework_header_search_path(pt) if pt.frame_header_search_paths_enable?
|
127
|
+
search_paths
|
128
|
+
}
|
127
129
|
header_search_paths.uniq
|
128
130
|
end
|
129
131
|
end
|
@@ -134,7 +136,8 @@ module Pod
|
|
134
136
|
alias_method :old_raw_header_search_paths, :_raw_header_search_paths
|
135
137
|
def _raw_header_search_paths
|
136
138
|
header_search_paths = old_raw_header_search_paths
|
137
|
-
header_search_paths
|
139
|
+
# 两个条件都满足时添加header_search_paths
|
140
|
+
header_search_paths.concat dependent_targets.flat_map { |pt| missing_framework_header_search_path(pt) } if target.should_build? && target.frame_header_search_paths_enable?
|
138
141
|
header_search_paths.uniq
|
139
142
|
end
|
140
143
|
|
@@ -12,11 +12,13 @@ module Pod
|
|
12
12
|
]
|
13
13
|
def self.options
|
14
14
|
[
|
15
|
-
['--force-push', '强制推送组件二进制到远程,远程有相同的校验和会被本地覆盖']
|
15
|
+
['--force-push', '强制推送组件二进制到远程,远程有相同的校验和会被本地覆盖'],
|
16
|
+
['--name', '需要推送到远程的组件名称,不填则推送全部的二进制组件到远程']
|
16
17
|
]
|
17
18
|
end
|
18
19
|
def initialize(argv)
|
19
20
|
@force_push = argv.flag?('force-push', false)
|
21
|
+
@name = argv.option('name')
|
20
22
|
super
|
21
23
|
end
|
22
24
|
|
@@ -32,7 +34,10 @@ module Pod
|
|
32
34
|
require 'cocoapods-jxedt/git_helper/cache_pucher'
|
33
35
|
|
34
36
|
output_dir = Pod::Config.instance.sandbox.root + Jxedt.config.binary_dir
|
35
|
-
|
37
|
+
|
38
|
+
targets = []
|
39
|
+
targets += @name.split(',') if @name && @name.length > 0
|
40
|
+
Jxedt::CachePucher.push(output_dir, targets, @force_push)
|
36
41
|
end
|
37
42
|
end
|
38
43
|
end
|
@@ -75,7 +75,8 @@ module Pod
|
|
75
75
|
lines = File.readlines(file_path)
|
76
76
|
# 获取命中的行
|
77
77
|
File.foreach(file_path).with_index {|line, num|
|
78
|
-
|
78
|
+
matched_regex = "(^\s*#import\s*\"#{header_name_regulation}\")|(^\s*#import\s*<#{header_name_regulation}>)"
|
79
|
+
matched = line =~ /#{matched_regex}/
|
79
80
|
next unless matched
|
80
81
|
|
81
82
|
header_name = line.match(/(?<=")#{header_name_regulation}(?=")/) || line.match(/(?<=<)#{header_name_regulation}(?=>)/)
|
@@ -83,7 +84,7 @@ module Pod
|
|
83
84
|
|
84
85
|
changed = true # 文件需要修改
|
85
86
|
project_module_name = public_header_mapping["#{header_name}"]
|
86
|
-
replace_line = "#import
|
87
|
+
replace_line = line.gsub(/#{matched_regex}/, "#import <#{project_module_name}/#{header_name}>")
|
87
88
|
lines[num] = replace_line
|
88
89
|
record << "#{file_path} 第#{num}行,#{line} => #{replace_line}"
|
89
90
|
}
|
@@ -107,7 +108,8 @@ module Pod
|
|
107
108
|
文件修改详情:
|
108
109
|
#{JSON.pretty_generate(record)}
|
109
110
|
LOGS
|
110
|
-
logs.gsub!('\\"', '"')
|
111
|
+
logs.gsub!('\\"', '"')# 去除转义字符
|
112
|
+
logs.gsub!('\\n', '') # 去除转义字符
|
111
113
|
puts logs if @verbose_flag
|
112
114
|
File.open(log_file_path, 'w') { |file| file.write("#{logs}") } unless log_file_path.nil?
|
113
115
|
end
|
@@ -53,7 +53,7 @@ module Pod
|
|
53
53
|
all_binary! 组件全部使用二进制
|
54
54
|
binary_dir('../_Prebuild') 配置二进制的放置路径
|
55
55
|
binary_switch(true) 二进制开关
|
56
|
-
framework_header_search_enabled
|
56
|
+
framework_header_search_enabled! 开启配置依赖的framework头文件配置
|
57
57
|
use_binary_settings(Hash) 使用二进制的组件配置
|
58
58
|
cocoapods_jxedt_config(Hash) 配置插件
|
59
59
|
DSL_METHOD
|
@@ -16,7 +16,7 @@ module Jxedt
|
|
16
16
|
output_dir.children.each do |child|
|
17
17
|
next unless child.directory?
|
18
18
|
pod_name = child.basename.to_s
|
19
|
-
next if targets && targets.is_a?(Array) && !(targets.include?(pod_name))
|
19
|
+
next if targets && targets.is_a?(Array) && targets.size > 0 && !(targets.include?(pod_name))
|
20
20
|
|
21
21
|
pod_checksum = child.children.select { |ch| ch.extname == '.checksum' }.first
|
22
22
|
pod_checksum = pod_checksum.basename.sub_ext('').to_s unless pod_checksum.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-jxedt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guojiashuang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|