cocoapods-bb-PodAssistant 0.3.0 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35d02b24a30633e891421f088d9fe05c17585e9b6db05f0c337a9468b980adf5
4
- data.tar.gz: 4c7ac41d4a5f98ab346dfa587a686f079af075ef434df61e5441597f84f265f7
3
+ metadata.gz: 3774e1b9fbb57845be46192a1fdea9d4fa85012420a0ad23f3cb51571728f0e2
4
+ data.tar.gz: '069de9649aaea81817c3f904baa8d2fdb7e699abc7d458432489f7e1cb6c3654'
5
5
  SHA512:
6
- metadata.gz: 58d31747fb116514f4520aacf1b730d0503d7e5ca3ca136772488519871ae667dad4200fb05ae65938378e8c47268e86fad32275b794bea660a65227836eee8b
7
- data.tar.gz: 32b9d36bf4238aaf709dc6bdad0feded1ba5845270d42089d6cae5490120a99a1695c755b4edffdf10c9b4b1f96f187dc6eaaa1f70320e3d4b19a9133ceb9e17
6
+ metadata.gz: 26313aa22faefbc6e969880f4d8060d8b6dc5731c90157d63957779702c7e391297f533b70942f90b4edc7389ff55555f9266ce7e26e12b8ca88eab636c9d8a7
7
+ data.tar.gz: e4c680e8d7c6b1c598014efd889cdfdee4a9a66e9f30ccdc0b0d7dc7bdb672362cab0550a515bed13f1f64688e0298de77ec665520b221e520bee06277664cc5
@@ -7,14 +7,29 @@ require 'cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment'
7
7
  require 'cocoapods-bb-PodAssistant/helpers/pod_utils'
8
8
 
9
9
  class PodPostInstaller
10
- def initialize(lib, deployment_target=nil)
10
+ def initialize(lib, deployment_target=nil, filter_targets=["test"], is_matrix=true)
11
11
  @lib = lib
12
12
  if deployment_target.nil?
13
13
  @deployment_target = isUnity3DApp ? "12.0" : "11.0" # Unity2022引擎最低支持iOS12.0、unity2d iOS11 、cocos iOS10、超A产品 iOS11 (968广告厂商升级最低支持iOS11)
14
14
  else
15
15
  @deployment_target = deployment_target
16
16
  end
17
+ if filter_targets.is_a? Array
18
+ @filter_targets = filter_targets # 过滤target
19
+ elsif filter_targets.is_a? String
20
+ @filter_targets = [filter_targets] # 过滤target
21
+ end
22
+ @is_matrix = is_matrix
17
23
  end
24
+ private def filterTargetName(target_name)
25
+ for name in @filter_targets
26
+ if target_name.include?(name)
27
+ return true
28
+ end
29
+ end
30
+ return false
31
+ end
32
+
18
33
  def run
19
34
  env = BabybusInstallEnv.new()
20
35
  is_xcode15 = BB::PodUtils.compare_xcode_15_version
@@ -30,8 +45,9 @@ class PodPostInstaller
30
45
  project = Xcodeproj::Project.open(BB::PodUtils.getXcodeprojPath)
31
46
  project.targets.each do |target|
32
47
  target.build_configurations.each do |config|
33
- if !target.name.include? '_test' # 过滤target test 工程
34
- if config.name.include? 'Debug' # 只有debug环境才进行替换操作,其它环境交由打包机处理
48
+ # if !target.name.include? 'test'
49
+ if !filterTargetName(target.name) # 过滤target test 工程
50
+ if (@is_matrix == true) && (config.name.include? 'Debug') # 只有debug环境才进行替换操作,其它环境交由打包机处理
35
51
  puts "[#{target.name}/#{config.name}] 开发者debug环境环境替换[PlistMacro/cocos/unity]文件操作,其它环境交由打包机处理".red
36
52
  env.copyPlistMacro # 开发自行打开不能提交到版本控制,避免test包出现配置不正确情况 by hm 22/5/17
37
53
  if (isUnityProject) then
@@ -42,7 +58,8 @@ class PodPostInstaller
42
58
  end
43
59
  # iOS17适配添加ld64
44
60
  if (is_xcode15 == true) then
45
- config.build_settings['OTHER_LDFLAGS'] = "$(inherited) -lxml2 -lz -ObjC -lstdc++ -ld64"
61
+ # xcode15 打包添加属性 -weak_framework SwiftUI,避免iOS12系统crash
62
+ config.build_settings['OTHER_LDFLAGS'] = "$(inherited) -lxml2 -lz -ObjC -lstdc++ -ld64 -weak_framework SwiftUI"
46
63
  else
47
64
  config.build_settings['OTHER_LDFLAGS'] = "$(inherited) -lxml2 -lz -ObjC -lstdc++"
48
65
  end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBbPodassistant
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'xcodeproj'
5
5
  require 'cocoapods'
6
+ require 'find'
6
7
 
7
8
  module BB
8
9
  class PodUtils
@@ -76,7 +77,25 @@ module BB
76
77
  if File.exist?(path)
77
78
  return path
78
79
  end
79
- puts "无法找打工程Info.plist配置文件,工程目录:#{getProjectPath}".yellow
80
+ info_path = ""
81
+ # 定义搜索目录
82
+ search_dir = getProjectPath
83
+ # 使用 Find 模块来递归搜索目录中的文件
84
+ Find.find(search_dir) do |path|
85
+ name = File.basename(path)
86
+ # 排除 pods 文件夹
87
+ if FileTest.directory?(path) && (name == 'Pods' || name.include?('.xcodeproj') || name.include?('Tests'))
88
+ Find.prune
89
+ elsif FileTest.file?(path) && name == 'Info.plist'
90
+ # 如果找到 Info.plist 文件,则输出其路径
91
+ puts "Info.plist 文件路径:#{path}"
92
+ info_path = path
93
+ end
94
+ end
95
+ if File.exist?(info_path)
96
+ return info_path
97
+ end
98
+ puts "无法找打工程Info.plist配置文件,工程目录:#{getProjectPath} @hm确认".red
80
99
  return nil
81
100
  # raise Informative, "#{path} File no exist, please check" unless File.exist?(path)
82
101
  # return path
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-PodAssistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.4.21
146
+ rubygems_version: 3.5.6
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: A longer description of cocoapods-bb-PodAssistant.