cocoapods-bb-PodAssistant 0.3.6.2 → 0.3.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f34515d702bbf182688fae8e8b1d1b1d22488628b3312328957b72fc13e0c865
4
- data.tar.gz: 4bf71a8872cd8a67a2d504d957cb39fc4e601beb293c9f4b903142220b145742
3
+ metadata.gz: c05511614be707f5cfee282c3d4beaac8d1aa1fadc7803e5b5d8cea957b5d557
4
+ data.tar.gz: 7bd4674f79a97cb62acb9c6bc7b28ee70c3c5fb8c2337cb00403d5bd021d2c1f
5
5
  SHA512:
6
- metadata.gz: '09c1c80f19fbb5aee48e4b214371ad5547552267a45aaa620bcaba40a91b0431079f0ac1a1162fee58dbaa4e450feda48f534009395d158a277b737482f968b6'
7
- data.tar.gz: eb7228a8063420cb6066b9a245812312e3434a160814ad85283a3e22ab68e91f5ce954619f7f5021518a15f47b0880b37552a948a9ff424669ad45e36daf3449
6
+ metadata.gz: c909195ec59c9c1b0c10e5c2681cd04be0db0f82f9813ad82396d036105eb0dc978483a639d611718abd992bcadf51e78bd9f7da8573d807bee294ecfb825d4f
7
+ data.tar.gz: 7a81e1511ad9cc43bf7eb8f208f08e056fd88a04d270732a47566775db124e1b4c71ef6194c4bd34b2a64004cc81e7063262b120dd1e35da999659b18b625fd9
@@ -0,0 +1,19 @@
1
+ module BB
2
+ class DataConfig
3
+ def self.config
4
+ @config ||= DataConfig.new
5
+ end
6
+
7
+ # 需要过滤忽略组件
8
+ def ignore_dependencies_pod_names
9
+ puts "<===获取业务方配置过滤组件数据:#{@ignore_pods_list}".yellow
10
+ return @ignore_pods_list
11
+ end
12
+
13
+ # 配置过滤忽略组件
14
+ def set_ignore_dependencies_pod_names(pods=[])
15
+ puts "==>业务方配置需要过滤组件数据:#{pods} cls:#{pods.class}".yellow
16
+ @ignore_pods_list=pods
17
+ end
18
+ end
19
+ end
@@ -3,6 +3,7 @@ require 'cocoapods-bb-PodAssistant/config/stable_specs'
3
3
  require 'cocoapods-bb-PodAssistant/helpers/stable_manager_helper'
4
4
  require 'cocoapods-core'
5
5
  require 'cocoapods-bb-PodAssistant/helpers/stable_env_helper'
6
+ require 'cocoapods-bb-PodAssistant/config/data_config'
6
7
 
7
8
  # 数据源管理
8
9
  module BB
@@ -392,7 +393,9 @@ module BB
392
393
  end
393
394
  # 矩阵产品需要过滤组件
394
395
  def matrix_filter_pod_names(pods, ignore_dependencies_pod_names=[])
395
- ignore_dependencies_pod_names=['BBSAdvert','BBSAdvertCompany'] unless ignore_dependencies_pod_names.nil? # 如果业务方配置,以业务方为主,默认处理广告业务
396
+ if ignore_dependencies_pod_names.nil? || ignore_dependencies_pod_names.length == 0
397
+ ignore_dependencies_pod_names=['BBSAdvert','BBSAdvertCompany'] # 如果业务方配置,以业务方为主,默认处理广告业务
398
+ end
396
399
  find_ok_dependencies_pod_names=[]
397
400
  filter_pod_names=[]
398
401
  whitelist_pods={}
@@ -401,8 +404,14 @@ module BB
401
404
  if ignore_dependencies_pod_names.length > 0
402
405
  puts "业务方配置需要过滤数据:#{ignore_dependencies_pod_names} cls:#{ignore_dependencies_pod_names.class}".yellow
403
406
  pods.each do |pod|
404
- if pod.is_a?(Hash) # 存在依赖关系
407
+ if pod.is_a?(Hash) # 存在字典依赖关系
405
408
  pod_name = pod.keys.first
409
+ elsif pod.is_a?(String) # 存在字符串依赖关系
410
+ pod_name = pod
411
+ else
412
+ pod_name = nil
413
+ end
414
+ if !pod_name.empty?
406
415
  name, version = name_and_version_from_string(pod_name)
407
416
  podCoreName = subspec_podname(name)
408
417
  if ignore_dependencies_pod_names.include?(podCoreName) || find_ok_dependencies_pod_names.include?(name)
@@ -411,23 +420,30 @@ module BB
411
420
  end
412
421
  sub_pods=[]
413
422
  data = pod[pod_name]
414
- data.each do | pod |
415
- dependencies_pod_name = name_from_string(pod)
416
- if dependencies_pod_name.include?(name) #subspecs
417
- if !find_ok_dependencies_pod_names.include?(dependencies_pod_name)
418
- find_ok_dependencies_pod_names.push(dependencies_pod_name)
423
+ # puts "podCoreName:#{podCoreName} type:#{data.class} data:#{data}"
424
+ if data.is_a?(Array) # 存在数组依赖关系
425
+ data.each do | pod |
426
+ dependencies_pod_name = name_from_string(pod)
427
+ if dependencies_pod_name.include?(name) #subspecs
428
+ if !find_ok_dependencies_pod_names.include?(dependencies_pod_name)
429
+ find_ok_dependencies_pod_names.push(dependencies_pod_name)
430
+ end
419
431
  end
420
- end
421
- if !sub_pods.include?(dependencies_pod_name)
422
- sub_pods.push(dependencies_pod_name)
423
- end
424
- tmp_whitelist_pod_names = whitelist_pods[podCoreName]
425
- if (podCoreName != name) && !tmp_whitelist_pod_names.include?(dependencies_pod_name)
426
- dependencies_core_pod_name = subspec_podname(dependencies_pod_name)
427
- if (podCoreName != dependencies_core_pod_name) && !whitelist.include?(dependencies_core_pod_name) && !filter_pod_names.include?(dependencies_core_pod_name)
428
- filter_pod_names.push(dependencies_core_pod_name)
432
+ if !sub_pods.include?(dependencies_pod_name)
433
+ sub_pods.push(dependencies_pod_name)
434
+ end
435
+ tmp_whitelist_pod_names = whitelist_pods[podCoreName]
436
+ if (podCoreName != name) && !tmp_whitelist_pod_names.include?(dependencies_pod_name)
437
+ dependencies_core_pod_name = subspec_podname(dependencies_pod_name)
438
+ if (podCoreName != dependencies_core_pod_name) && !whitelist.include?(dependencies_core_pod_name) && !filter_pod_names.include?(dependencies_core_pod_name)
439
+ filter_pod_names.push(dependencies_core_pod_name)
440
+ end
429
441
  end
430
442
  end
443
+ elsif data.is_a?(String) # 存在字符串依赖关系
444
+ if !whitelist.include?(podCoreName) && !filter_pod_names.include?(podCoreName)
445
+ filter_pod_names.push(podCoreName)
446
+ end
431
447
  end
432
448
  if podCoreName == name
433
449
  whitelist_pods[podCoreName]=sub_pods
@@ -459,7 +475,8 @@ module BB
459
475
  end
460
476
  # 生成项目stable配置文件
461
477
  # 策略:根据podfile.lock dependencies依赖记录pod core标签/分支数据,不存储subspec数据
462
- def generate_localStable(ignore_dependencies_pod_names=[])
478
+ def generate_localStable()
479
+ ignore_dependencies_pod_names = BB::DataConfig.config.ignore_dependencies_pod_names
463
480
  lockfile = podfile_lock
464
481
  local_specs = {}
465
482
  internal_data = lockfile.internal_data
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBbPodassistant
2
- VERSION = "0.3.6.2"
2
+ VERSION = "0.3.7.1"
3
3
  end
@@ -21,8 +21,10 @@ module BB
21
21
  # member_configs 项目成员工程配置
22
22
  # ignore_local_stable 是否忽略本地stable配置,true 适合pod子组件
23
23
  # skip_stable_check 是否跳过stable检测,true 采用标准pod合并操作
24
- def initialize(all_modules, member_modules = {}, member_configs = [], ignore_local_stable = false, skip_stable_check = false)
24
+ # ignore_dependencies_pod_names 过滤组件,不受stable版本控制
25
+ def initialize(all_modules, member_modules = {}, member_configs = [], ignore_local_stable = false, skip_stable_check = false, ignore_dependencies_pod_names=[])
25
26
  @source_manager = BB::SourceManager.new()
27
+ BB::DataConfig.config.set_ignore_dependencies_pod_names(ignore_dependencies_pod_names)
26
28
  #加载远程稳定仓库 和本地podfile 指定的仓库进行合并
27
29
  if skip_stable_check == true
28
30
  # 过滤带:remove数据
@@ -54,11 +54,17 @@ module Pod
54
54
  source_manager.generate_pod_module_dependency(pod_names)
55
55
  end
56
56
  # pod组件合并操作(项目)
57
- def project_pod_module_run(pod_modules, member_modules = {}, member_configs = [], skip_stable_check = false)
57
+ # 参数说明
58
+ # all_modules 业务使用组件
59
+ # member_modules 项目成员模块,一般用于切本地开发使用
60
+ # member_configs 项目成员工程配置
61
+ # skip_stable_check 是否跳过stable检测,true 采用标准pod合并操作
62
+ # ignore_dependencies_pod_names 过滤组件,不受stable版本控制
63
+ def project_pod_module_run(pod_modules, member_modules = {}, member_configs = [], skip_stable_check = false, ignore_dependencies_pod_names=[])
58
64
  # Pod::UI.puts "Pod Module:#{pod_modules}"
59
65
  time1 = Time.new
60
66
  puts "[PodAssistant]项目pod组件组装开始操作时间:#{time1}".green
61
- source = BB::PodModule.new(pod_modules, member_modules, member_configs, false, skip_stable_check)
67
+ source = BB::PodModule.new(pod_modules, member_modules, member_configs, false, skip_stable_check, ignore_dependencies_pod_names)
62
68
  pod_box_module_run(source)
63
69
  time2 = Time.new
64
70
  puts "[PodAssistant]项目pod组件组装结束时间:#{time2}".green
@@ -67,11 +73,16 @@ module Pod
67
73
  puts "项目pod组件组装操作耗时:#{time.to_s.send(:red)}秒".green
68
74
  end
69
75
  # pod组件合并操作(单组件)
70
- def pod_module_run(pod_modules, member_modules = {}, member_configs = [])
76
+ # 参数说明
77
+ # all_modules 业务使用组件
78
+ # member_modules 项目成员模块,一般用于切本地开发使用
79
+ # member_configs 项目成员工程配置
80
+ # ignore_dependencies_pod_names 过滤组件,不受stable版本控制
81
+ def pod_module_run(pod_modules, member_modules = {}, member_configs = [], ignore_dependencies_pod_names=[])
71
82
  # Pod::UI.puts "Pod Module:#{pod_modules}"
72
83
  time1 = Time.new
73
84
  puts "[PodAssistant]pod组件组装开始操作时间:#{time1}".green
74
- source = BB::PodModule.new(pod_modules, member_modules, member_configs, true, true)
85
+ source = BB::PodModule.new(pod_modules, member_modules, member_configs, true, true, ignore_dependencies_pod_names)
75
86
  pod_box_module_run(source)
76
87
  time2 = Time.new
77
88
  puts "[PodAssistant]pod组件组装结束时间:#{time2}".green
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.6.2
4
+ version: 0.3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-10 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.2.8.1
47
+ version: 0.2.9.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.2.8.1
54
+ version: 0.2.9.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fastlane
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.3'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '1.3'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -125,6 +125,7 @@ files:
125
125
  - lib/cocoapods-bb-PodAssistant/command/stable/sync.rb
126
126
  - lib/cocoapods-bb-PodAssistant/command/stable/update.rb
127
127
  - lib/cocoapods-bb-PodAssistant/config/cache_path.rb
128
+ - lib/cocoapods-bb-PodAssistant/config/data_config.rb
128
129
  - lib/cocoapods-bb-PodAssistant/config/source_manager.rb
129
130
  - lib/cocoapods-bb-PodAssistant/config/stable_source.rb
130
131
  - lib/cocoapods-bb-PodAssistant/config/stable_specs.rb
@@ -161,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
162
  - !ruby/object:Gem::Version
162
163
  version: '0'
163
164
  requirements: []
164
- rubygems_version: 3.5.18
165
+ rubygems_version: 3.5.21
165
166
  signing_key:
166
167
  specification_version: 4
167
168
  summary: A longer description of cocoapods-bb-PodAssistant.