cocoapods-bb-PodAssistant 0.3.15.2 → 0.3.16.3
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-bb-PodAssistant/babybus/installer/post_install_hooks.rb +82 -4
- data/lib/cocoapods-bb-PodAssistant/babybus/installer/post_integrate_hooks.rb +115 -0
- data/lib/cocoapods-bb-PodAssistant/gem_version.rb +1 -1
- data/lib/cocoapods-bb-PodAssistant/helpers/pod_module_helper.rb +6 -6
- data/lib/cocoapods-bb-PodAssistant/helpers/pod_utils.rb +30 -41
- data/lib/cocoapods-bb-PodAssistant/helpers/stable_env_helper.rb +4 -3
- data/lib/cocoapods-bb-PodAssistant/podfile.rb +6 -0
- data/lib/cocoapods_plugin.rb +1 -0
- 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: c9dda34304494142fff1d2d9e2f042f6da85a4b65e92dd0a34da3ad98fd0b18e
|
|
4
|
+
data.tar.gz: 8d7aee480f317ea8edd39ebeea4576ef04859c70c5688b7b84ff97f149eb75ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0062da92ae2bc9455108ed6e55b1d840f26f6b83819c3286f072bdb761a1ea98509741ededc78b252a7a0b69308085753e120f3d2cbe12c23df629be8e8b75d
|
|
7
|
+
data.tar.gz: f02f30f480c2b7f16f163751843dbc82c0aa73d7eaee0d605e10e0859e070f53fc7a1cc954f0c68b4382fc7b4a4ce34ddb8656aac6ad46447c6330ddbf00d960
|
|
@@ -8,7 +8,7 @@ require 'cocoapods-bb-PodAssistant/helpers/pod_utils'
|
|
|
8
8
|
require 'fileutils'
|
|
9
9
|
|
|
10
10
|
class PodPostInstaller
|
|
11
|
-
# 安装pod hook操作
|
|
11
|
+
# 安装pod hook操作 进行环境修复,处理 Pods target
|
|
12
12
|
# 参数说明
|
|
13
13
|
# lib 组件库
|
|
14
14
|
# deployment_target 工程最低支持版本,默认unity3d 12.0 / 其它11.0, 976开始默认12.0 广告sdk要求
|
|
@@ -18,9 +18,12 @@ class PodPostInstaller
|
|
|
18
18
|
def initialize(lib, deployment_target=nil, filter_targets=["test"], is_matrix=true, is_replaceMinVersionForMultiTarget=false)
|
|
19
19
|
@lib = lib
|
|
20
20
|
if deployment_target.nil?
|
|
21
|
+
is_xcode27 = BB::PodUtils.above_xcode_27_version
|
|
21
22
|
is_xcode16 = BB::PodUtils.above_xcode_16_version
|
|
22
23
|
if (is_xcode16 == true) then
|
|
23
24
|
@deployment_target = "13.0" # iOS18最低支持13系统
|
|
25
|
+
elsif (is_xcode27 == true) then
|
|
26
|
+
@deployment_target = "15.0" # iOS27最低支持15系统
|
|
24
27
|
else
|
|
25
28
|
@deployment_target = isUnity3DApp ? "12.0" : "11.0" # Unity2022引擎最低支持iOS12.0、unity2d iOS11 、cocos iOS10、超A产品 iOS11 (968广告厂商升级最低支持iOS11)
|
|
26
29
|
end
|
|
@@ -44,6 +47,52 @@ class PodPostInstaller
|
|
|
44
47
|
return false
|
|
45
48
|
end
|
|
46
49
|
|
|
50
|
+
# 修正Pods-XXX-frameworks.sh脚本framework拷贝文件报错问题,xcframework缺少模拟器架构导致编译报错
|
|
51
|
+
def fix_pods_frameworks()
|
|
52
|
+
installer = @lib
|
|
53
|
+
Dir.glob(File.join(installer.sandbox.root.to_s, 'Target Support Files', 'Pods-*', 'Pods-*-frameworks.sh')).each do |script_path|
|
|
54
|
+
content = File.read(script_path)
|
|
55
|
+
old_code = <<~'SH'
|
|
56
|
+
install_framework()
|
|
57
|
+
{
|
|
58
|
+
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
|
59
|
+
local source="${BUILT_PRODUCTS_DIR}/$1"
|
|
60
|
+
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
|
|
61
|
+
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
|
|
62
|
+
elif [ -r "$1" ]; then
|
|
63
|
+
local source="$1"
|
|
64
|
+
fi
|
|
65
|
+
SH
|
|
66
|
+
new_code = <<~'SH'
|
|
67
|
+
install_framework()
|
|
68
|
+
{
|
|
69
|
+
local source=""
|
|
70
|
+
|
|
71
|
+
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
|
72
|
+
source="${BUILT_PRODUCTS_DIR}/$1"
|
|
73
|
+
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
|
|
74
|
+
source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
|
|
75
|
+
elif [ -r "$1" ]; then
|
|
76
|
+
source="$1"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
if [ -z "$source" ]; then
|
|
80
|
+
if [[ "$PLATFORM_NAME" == *"simulator"* || "${EFFECTIVE_PLATFORM_NAME-}" == *"simulator"* ]]; then
|
|
81
|
+
echo "warning: [CP] $(basename "$1"): Skip missing unsupported Simulator framework: $1"
|
|
82
|
+
return 0
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
echo "error: [CP] $(basename "$1"): Framework not found for device build: $1"
|
|
86
|
+
return 1
|
|
87
|
+
fi
|
|
88
|
+
SH
|
|
89
|
+
flag = content.include?(old_code)
|
|
90
|
+
next unless content.include?(old_code)
|
|
91
|
+
updated = content.sub(old_code, new_code)
|
|
92
|
+
File.write(script_path, updated) if updated != content
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
47
96
|
# 修正Xcode16静态库不能po问题(打印swift参数、全局变量)
|
|
48
97
|
def fix_above_xcode16_no_po()
|
|
49
98
|
is_above_xcode16 = BB::PodUtils.above_xcode_16_version # 高于16
|
|
@@ -128,9 +177,12 @@ class PodPostInstaller
|
|
|
128
177
|
|
|
129
178
|
def run
|
|
130
179
|
env = BabybusInstallEnv.new()
|
|
180
|
+
is_above_xcode27 = BB::PodUtils.above_xcode_27_version # 高于27
|
|
131
181
|
is_above_xcode26 = BB::PodUtils.above_xcode_26_version # 高于26
|
|
132
182
|
# is_above_xcode15 = BB::PodUtils.compare_xcode_15_version # 高于15
|
|
133
183
|
# is_below_xcode15 = BB::PodUtils.below_xcode_15_version # 低于15
|
|
184
|
+
# 修正Pods-XXX-frameworks.sh脚本framework拷贝文件报错问题,xcframework缺少模拟器架构导致编译报错
|
|
185
|
+
fix_pods_frameworks()
|
|
134
186
|
# 是否Untify项目
|
|
135
187
|
isUnityProject = isUnityApp
|
|
136
188
|
# Untify项目需要移除cocos项目res/src目录
|
|
@@ -179,16 +231,30 @@ class PodPostInstaller
|
|
|
179
231
|
else
|
|
180
232
|
puts "[Skipped] #{target.name} #{config.name}: already up-to-date"
|
|
181
233
|
end
|
|
182
|
-
#
|
|
183
|
-
|
|
234
|
+
# 配置工程最低部署:
|
|
235
|
+
# 1. 多 Target 产品显式开启替换时继续保持原有行为;
|
|
236
|
+
# 2. Xcode 27+ 强制将工程最低支持版本统一为 ios_deployment_target。
|
|
237
|
+
if @is_replaceMinVersionForMultiTarget || is_above_xcode27
|
|
184
238
|
origin_value = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
|
|
185
|
-
if origin_value.
|
|
239
|
+
if origin_value.to_s != ios_deployment_target.to_s
|
|
186
240
|
should_save = true
|
|
187
241
|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_deployment_target.to_s
|
|
188
242
|
new_value = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
|
|
189
243
|
puts "#{target.name}-#{config.name} Build Setting 'IPHONEOS_DEPLOYMENT_TARGET' deployment target: #{origin_value} => #{new_value}"
|
|
190
244
|
end
|
|
191
245
|
end
|
|
246
|
+
# Xcode27去除EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
|
|
247
|
+
if (is_above_xcode27 == true) then
|
|
248
|
+
key = 'EXCLUDED_ARCHS[sdk=iphonesimulator*]'
|
|
249
|
+
excluded_archs = config.build_settings[key]
|
|
250
|
+
next if excluded_archs.nil?
|
|
251
|
+
archs = excluded_archs.to_s.split.reject { |arch| arch == 'arm64' }
|
|
252
|
+
if archs.empty?
|
|
253
|
+
config.build_settings.delete(key)
|
|
254
|
+
else
|
|
255
|
+
config.build_settings[key] = archs.join(' ')
|
|
256
|
+
end
|
|
257
|
+
end
|
|
192
258
|
end
|
|
193
259
|
end
|
|
194
260
|
end
|
|
@@ -250,6 +316,18 @@ class PodPostInstaller
|
|
|
250
316
|
else
|
|
251
317
|
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = "$(inherited)"
|
|
252
318
|
end
|
|
319
|
+
# Xcode27去除EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
|
|
320
|
+
if (is_above_xcode27 == true) then
|
|
321
|
+
key = 'EXCLUDED_ARCHS[sdk=iphonesimulator*]'
|
|
322
|
+
excluded_archs = config.build_settings[key]
|
|
323
|
+
next if excluded_archs.nil?
|
|
324
|
+
archs = excluded_archs.to_s.split.reject { |arch| arch == 'arm64' }
|
|
325
|
+
if archs.empty?
|
|
326
|
+
config.build_settings.delete(key)
|
|
327
|
+
else
|
|
328
|
+
config.build_settings[key] = archs.join(' ')
|
|
329
|
+
end
|
|
330
|
+
end
|
|
253
331
|
end
|
|
254
332
|
# 修复警告 Run script build phase '[CP] Copy Pods Resources' will be run during every build because it does not specify any outputs
|
|
255
333
|
fix_phases = target.shell_script_build_phases.find { |x| x.name == '[CP] Copy XCFrameworks' || 'Create Symlinks to Header Folders' }
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/ruby
|
|
2
|
+
# Author = Min Hu
|
|
3
|
+
|
|
4
|
+
require 'xcodeproj'
|
|
5
|
+
require 'cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper'
|
|
6
|
+
require 'cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment'
|
|
7
|
+
require 'cocoapods-bb-PodAssistant/helpers/pod_utils'
|
|
8
|
+
require 'fileutils'
|
|
9
|
+
|
|
10
|
+
class PodPostIntegrate
|
|
11
|
+
# 安装pod hook操作,处理最终生成的xcconfig
|
|
12
|
+
# 参数说明
|
|
13
|
+
# lib 组件库
|
|
14
|
+
# simulator_unsupported_binaries 过滤不支持模拟器二进制库,多个使用[],举例:['libRecorder.a','SingSound.framework']
|
|
15
|
+
DEFAULT_SIMULATOR_UNSUPPORTED_BINARIES = [
|
|
16
|
+
# ttsdk
|
|
17
|
+
'RangersAppLog.framework', 'TTSDKFramework.framework', 'libRangersAppLog_CN_awesome_ios.a','libRangersAppLog_Core_awesome_ios.a','libRangersAppLog_Log_awesome_ios.a','libRangersAppLog_SG_awesome_ios.a','libRangersAppLog_VA_awesome_ios.a','libRangersAppLog_VOLC_awesome_ios.a',
|
|
18
|
+
# mango
|
|
19
|
+
'EasyReporter.framework', 'MGPlayerFoundation.framework', 'MgtvInteractiveMediaAds.framework', 'MGTVMediaSSPForAD.framework', 'MGTVSSPDownload.framework',
|
|
20
|
+
# um
|
|
21
|
+
'UMDevice.framework','UMRemoteConfig.framework','UMAPM.framework','UMCommon.framework',
|
|
22
|
+
# baiduBCE
|
|
23
|
+
'BaiduBCEBasic.framework','BaiduBCEBOS.framework','BaiduBCESTS.framework','BaiduBCEVOD.framework',
|
|
24
|
+
# record
|
|
25
|
+
'libRecorder.a',
|
|
26
|
+
# singsound
|
|
27
|
+
'SingSound.framework', 'libmp3lame.a', 'libssound-71-ios-3.0.3-20230926103957-SSL.a',
|
|
28
|
+
# share
|
|
29
|
+
'libWeiboSDK.a', 'QQSDK.framework',
|
|
30
|
+
'cocos2dx.framework',
|
|
31
|
+
'UnityFramework.framework',
|
|
32
|
+
'MediaPipeUnity.framework',
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def initialize(lib, simulator_unsupported_binaries = [])
|
|
36
|
+
@lib = lib
|
|
37
|
+
|
|
38
|
+
binaries = if simulator_unsupported_binaries.is_a?(Array)
|
|
39
|
+
simulator_unsupported_binaries
|
|
40
|
+
elsif simulator_unsupported_binaries.is_a?(String)
|
|
41
|
+
[simulator_unsupported_binaries]
|
|
42
|
+
else
|
|
43
|
+
[]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# 外部未传或传入空数组/空字符串时,只使用默认列表;
|
|
47
|
+
# 外部有传值时,在默认列表基础上追加业务自定义列表。
|
|
48
|
+
binaries = binaries.reject { |binary| binary.to_s.strip.empty? }
|
|
49
|
+
if binaries.empty?
|
|
50
|
+
@simulator_unsupported_binaries = DEFAULT_SIMULATOR_UNSUPPORTED_BINARIES.dup
|
|
51
|
+
else
|
|
52
|
+
@simulator_unsupported_binaries = DEFAULT_SIMULATOR_UNSUPPORTED_BINARIES.dup + binaries
|
|
53
|
+
end
|
|
54
|
+
# 去重,避免默认配置和业务自定义配置重复。
|
|
55
|
+
@simulator_unsupported_binaries.uniq!
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def run
|
|
59
|
+
installer = @lib
|
|
60
|
+
# 从 simulator_unsupported_binaries 中提取不支持 Simulator 的静态库名称
|
|
61
|
+
# 例如:libRecorder.a -> Recorder;SingSound.framework -> SingSound
|
|
62
|
+
simulator_unsupported_libraries = @simulator_unsupported_binaries
|
|
63
|
+
.select { |binary| File.extname(binary) == '.a' }
|
|
64
|
+
.map { |binary| File.basename(binary, '.a').sub(/^lib/, '') }
|
|
65
|
+
simulator_unsupported_frameworks = @simulator_unsupported_binaries
|
|
66
|
+
.select { |binary| File.extname(binary) == '.framework' }
|
|
67
|
+
.map { |binary| File.basename(binary, '.framework') }
|
|
68
|
+
puts "post_integrate===simulator_unsupported_libraries:#{simulator_unsupported_libraries}"
|
|
69
|
+
puts "post_integrate===simulator_unsupported_frameworks:#{simulator_unsupported_frameworks}"
|
|
70
|
+
Dir.glob(File.join(installer.sandbox.root.to_s, 'Target Support Files', 'Pods-*', 'Pods-*.xcconfig')).each do |xcconfig_path|
|
|
71
|
+
lines = File.readlines(xcconfig_path)
|
|
72
|
+
other_ldflags_line = lines.find do |line|
|
|
73
|
+
line.start_with?('OTHER_LDFLAGS = ') ||
|
|
74
|
+
line.start_with?('OTHER_LDFLAGS[sdk=iphoneos*] = ') ||
|
|
75
|
+
line.start_with?('OTHER_LDFLAGS[sdk=iphonesimulator*] = ')
|
|
76
|
+
end
|
|
77
|
+
next unless other_ldflags_line
|
|
78
|
+
original_flags = other_ldflags_line.sub('OTHER_LDFLAGS = ', '').strip
|
|
79
|
+
simulator_flags = original_flags.dup
|
|
80
|
+
simulator_unsupported_libraries.each do |library|
|
|
81
|
+
simulator_flags.gsub!(/-l"?#{Regexp.escape(library)}"?\s*/, '')
|
|
82
|
+
end
|
|
83
|
+
simulator_unsupported_frameworks.each do |framework|
|
|
84
|
+
escaped_framework = Regexp.escape(framework)
|
|
85
|
+
# 绝对匹配 framework 名称:
|
|
86
|
+
# -framework "SingSound" 只匹配 SingSound,不能误匹配 SingSoundSDK。
|
|
87
|
+
# 同时兼容带引号和不带引号两种 OTHER_LDFLAGS 格式。
|
|
88
|
+
simulator_flags.gsub!(
|
|
89
|
+
/(?:^|\s)-framework\s+(?:"#{escaped_framework}"|#{escaped_framework})(?=\s|$)/,
|
|
90
|
+
''
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
# 没有过滤掉任何linker flag 时,不改写xcconfig,避免pod install每次产生无意义文件变化
|
|
94
|
+
if simulator_flags == original_flags
|
|
95
|
+
next
|
|
96
|
+
end
|
|
97
|
+
device_setting = "OTHER_LDFLAGS[sdk=iphoneos*] = #{original_flags}\n"
|
|
98
|
+
simulator_setting = "OTHER_LDFLAGS[sdk=iphonesimulator*] = #{simulator_flags}\n"
|
|
99
|
+
lines.reject! do |line|
|
|
100
|
+
line.start_with?('OTHER_LDFLAGS = ') ||
|
|
101
|
+
line.start_with?('OTHER_LDFLAGS[sdk=iphoneos*] = ') ||
|
|
102
|
+
line.start_with?('OTHER_LDFLAGS[sdk=iphonesimulator*] = ')
|
|
103
|
+
end
|
|
104
|
+
lines << device_setting
|
|
105
|
+
lines << simulator_setting
|
|
106
|
+
# Xcode去除EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 支持Apple Silicon Simulator
|
|
107
|
+
content = lines.join # content = File.read(xcconfig_path)
|
|
108
|
+
updated = content.gsub(/^EXCLUDED_ARCHS\[sdk=iphonesimulator\*\]\s*=\s*(.*)$/) do
|
|
109
|
+
archs = Regexp.last_match(1).split.reject { |arch| arch == 'arm64' }
|
|
110
|
+
archs.empty? ? '' : "EXCLUDED_ARCHS[sdk=iphonesimulator*] = #{archs.join(' ')}"
|
|
111
|
+
end
|
|
112
|
+
File.write(xcconfig_path, updated)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -45,7 +45,7 @@ module BB
|
|
|
45
45
|
remove = pod[:remove]
|
|
46
46
|
if remove
|
|
47
47
|
pod_name = pod.first
|
|
48
|
-
puts "###业务方配置需要移除插件####names:[#{pod_name}] pod:#{pod}".
|
|
48
|
+
puts "###业务方配置需要移除插件####names:[#{pod_name}] pod:#{pod}".yellow
|
|
49
49
|
else
|
|
50
50
|
result_modules.push(pod)
|
|
51
51
|
end
|
|
@@ -225,13 +225,13 @@ module BB
|
|
|
225
225
|
version = podfile_pod[:version]
|
|
226
226
|
remove = podfile_pod[:remove]
|
|
227
227
|
if remove
|
|
228
|
-
puts "[PodAssistant] 过滤组件数据 #{podName} #{podfile_pod}".
|
|
228
|
+
puts "[PodAssistant] 过滤组件数据 #{podName} #{podfile_pod}".yellow
|
|
229
229
|
stable_hash.delete(podCoreName)
|
|
230
230
|
next
|
|
231
231
|
end
|
|
232
232
|
if (branch && !branch.empty?) || (git && !git.empty?)
|
|
233
233
|
# 项目配置指向分支数据,以本项目为主
|
|
234
|
-
puts "[PodAssistant] #{podName} 指向分支数据 => #{podfile_pod}"
|
|
234
|
+
puts "[PodAssistant] #{podName} 指向分支数据 => #{podfile_pod}"
|
|
235
235
|
stable_hash[podCoreName] = podfile_pod
|
|
236
236
|
if podName != podCoreName
|
|
237
237
|
need_update_pod_data[podName] = podfile_pod
|
|
@@ -306,7 +306,7 @@ module BB
|
|
|
306
306
|
if pod.is_a? Hash
|
|
307
307
|
remove = pod[:remove]
|
|
308
308
|
if remove
|
|
309
|
-
puts "[PodAssistant] 过滤组件数据 #{podName} #{pod} remove:#{remove}".
|
|
309
|
+
puts "[PodAssistant] 过滤组件数据 #{podName} #{pod} remove:#{remove}".yellow
|
|
310
310
|
stable_hash.delete(podName)
|
|
311
311
|
next
|
|
312
312
|
end
|
|
@@ -315,14 +315,14 @@ module BB
|
|
|
315
315
|
# puts "[PodAssistant] merge pod #{podName} #{pod}"
|
|
316
316
|
end
|
|
317
317
|
else
|
|
318
|
-
puts "[PodAssistant] 本地stable数据无变化<===完成"
|
|
318
|
+
puts "[PodAssistant] 本地stable数据无变化<===完成"
|
|
319
319
|
end
|
|
320
320
|
config = BB::DataConfig.config
|
|
321
321
|
json_data = config.get_custom_json_data
|
|
322
322
|
if json_data.nil? || json_data.empty?
|
|
323
323
|
puts ""
|
|
324
324
|
else
|
|
325
|
-
puts "打包后台配置更新自定义组件配置数据:#{json_data}"
|
|
325
|
+
puts "打包后台配置更新自定义组件配置数据:#{json_data}"
|
|
326
326
|
if json_data.is_a?(Hash)
|
|
327
327
|
json_data.each do |key, value|
|
|
328
328
|
stable_hash[key] = value
|
|
@@ -151,65 +151,54 @@ module BB
|
|
|
151
151
|
xcode_version = version_match[1]
|
|
152
152
|
return xcode_version
|
|
153
153
|
end
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
|
|
155
|
+
# 判断当前 Xcode 是否大于等于指定主版本
|
|
156
|
+
def self.above_xcode_version(version)
|
|
156
157
|
current_version = xcode_version
|
|
157
158
|
if current_version.nil?
|
|
158
159
|
puts "未找到安装的Xcode版本。".red
|
|
159
|
-
|
|
160
|
-
puts "当前Xcode版本:#{current_version}"
|
|
161
|
-
num_ver = current_version.to_i
|
|
162
|
-
return num_ver >= 14
|
|
160
|
+
return false
|
|
163
161
|
end
|
|
164
|
-
|
|
162
|
+
|
|
163
|
+
puts "当前Xcode版本:#{current_version}"
|
|
164
|
+
current_version.to_i >= version.to_i
|
|
165
165
|
end
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
|
|
167
|
+
# xcode14以上,14以后不再支持armv7(32位设备)
|
|
168
|
+
def self.compare_xcode_14_version
|
|
169
|
+
above_xcode_version(14)
|
|
169
170
|
end
|
|
170
171
|
# xcode15以上
|
|
171
172
|
def self.compare_xcode_15_version
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
above_xcode_version(15)
|
|
174
|
+
end
|
|
175
|
+
# xcode14以下
|
|
176
|
+
def self.below_xcode_15_version
|
|
177
|
+
return !compare_xcode_15_version
|
|
178
|
+
end
|
|
179
|
+
# xcode16以上
|
|
180
|
+
def self.above_xcode_16_version
|
|
181
|
+
above_xcode_version(16)
|
|
181
182
|
end
|
|
182
183
|
# xcode16以下
|
|
183
184
|
def self.below_xcode_16_version
|
|
184
185
|
return !above_xcode_16_version
|
|
185
186
|
end
|
|
186
|
-
#
|
|
187
|
-
def self.
|
|
188
|
-
|
|
189
|
-
if current_version.nil?
|
|
190
|
-
puts "未找到安装的Xcode版本。".red
|
|
191
|
-
else
|
|
192
|
-
puts "当前Xcode版本:#{current_version}"
|
|
193
|
-
num_ver = current_version.to_i
|
|
194
|
-
return num_ver >= 16
|
|
195
|
-
end
|
|
196
|
-
return false
|
|
187
|
+
# xcode26以上
|
|
188
|
+
def self.above_xcode_26_version
|
|
189
|
+
above_xcode_version(26)
|
|
197
190
|
end
|
|
198
191
|
# xcode26以下
|
|
199
192
|
def self.below_xcode_26_version
|
|
200
193
|
return !above_xcode_26_version
|
|
201
194
|
end
|
|
202
|
-
#
|
|
203
|
-
def self.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
num_ver = current_version.to_i
|
|
210
|
-
return num_ver >= 26
|
|
211
|
-
end
|
|
212
|
-
return false
|
|
195
|
+
# xcode27以上
|
|
196
|
+
def self.above_xcode_27_version
|
|
197
|
+
above_xcode_version(27)
|
|
198
|
+
end
|
|
199
|
+
# xcode27以下
|
|
200
|
+
def self.below_xcode_27_version
|
|
201
|
+
return !above_xcode_27_version
|
|
213
202
|
end
|
|
214
203
|
end
|
|
215
204
|
end
|
|
@@ -32,9 +32,10 @@ module BB
|
|
|
32
32
|
podfileContent_vaild = podfileContent.lines.reject { |line| line.strip.start_with?("#") }.join
|
|
33
33
|
stableCommand = podfileContent_vaild.match(/^\s*stable!\s*'([^']+)'(?:,\s*(\w+):\s*'([^']+)')*/m)
|
|
34
34
|
unless stableCommand
|
|
35
|
-
|
|
36
|
-
puts "stable!
|
|
37
|
-
|
|
35
|
+
stableCommand = "stable! 'https://git.babybus.co/babybus/ios/Specs/stable-specs.git', specs: 'stable_specs'"
|
|
36
|
+
# puts "- Error: not stable define in the podfile! you can define to podfile:".red
|
|
37
|
+
# puts "stable! 'https://git.babybus.co/babybus/ios/Specs/stable-specs.git', specs:'<业务线stbale名称-可选>', tag:'<标签-可选>', branch:'<分支-可选>'".green
|
|
38
|
+
# exit -9002
|
|
38
39
|
end
|
|
39
40
|
eval(stableCommand.to_s)
|
|
40
41
|
end
|
|
@@ -310,9 +310,15 @@ module Pod
|
|
|
310
310
|
end
|
|
311
311
|
when LOCAL
|
|
312
312
|
if ( path != nil && path.length > 0 )
|
|
313
|
+
if path.include?("{git_name}")
|
|
314
|
+
path = path.gsub("#", "")
|
|
315
|
+
path = path.gsub("{git_name}", name)
|
|
316
|
+
end
|
|
313
317
|
if File.exist?(path)
|
|
314
318
|
pod "#{name}", :path => "#{path}", :inhibit_warnings => inhibit_warnings_variable , :configurations => configurations, linkagesKey => linkages, linkageKey => linkage
|
|
315
319
|
swiftlint_from_module(path, source_module)
|
|
320
|
+
else
|
|
321
|
+
puts "指向本地无效...#{name} :path =>#{path}".yellow
|
|
316
322
|
end
|
|
317
323
|
else
|
|
318
324
|
module_with_method(REMOTE_VERSION, source_module, current_member)
|
data/lib/cocoapods_plugin.rb
CHANGED
|
@@ -5,5 +5,6 @@ require 'cocoapods-bb-PodAssistant/source_provider_hook'
|
|
|
5
5
|
require 'cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper'
|
|
6
6
|
require 'cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment'
|
|
7
7
|
require 'cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks'
|
|
8
|
+
require 'cocoapods-bb-PodAssistant/babybus/installer/post_integrate_hooks'
|
|
8
9
|
|
|
9
10
|
require 'cocoapods-bb-PodAssistant/command'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocoapods-bb-PodAssistant
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.16.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- humin
|
|
@@ -155,6 +155,7 @@ files:
|
|
|
155
155
|
- lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb
|
|
156
156
|
- lib/cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper.rb
|
|
157
157
|
- lib/cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks.rb
|
|
158
|
+
- lib/cocoapods-bb-PodAssistant/babybus/installer/post_integrate_hooks.rb
|
|
158
159
|
- lib/cocoapods-bb-PodAssistant/babybus/linkline/target-linkline.rb
|
|
159
160
|
- lib/cocoapods-bb-PodAssistant/babybus/linkline/targetValidator-linkline.rb
|
|
160
161
|
- lib/cocoapods-bb-PodAssistant/babybus/linkline/targetdefinition-linkline.rb
|
|
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
220
|
- !ruby/object:Gem::Version
|
|
220
221
|
version: '0'
|
|
221
222
|
requirements: []
|
|
222
|
-
rubygems_version: 4.0.
|
|
223
|
+
rubygems_version: 4.0.19
|
|
223
224
|
specification_version: 4
|
|
224
225
|
summary: A longer description of cocoapods-bb-PodAssistant.
|
|
225
226
|
test_files: []
|