cocoapods-bb-PodAssistant 0.2.6 → 0.3.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: a2f479136e8df55d4ac4833cbd6542fc65bb11cc5e5ea2ef137806cde3103c30
4
- data.tar.gz: a6487fd194b8b54792a917285a8ee9daf10bc9b5d626addb6e8e79b500783aaf
3
+ metadata.gz: 8ec894300fc20becaf41cdc3960276b0592044944ab6f9c03050ae222f7fc29d
4
+ data.tar.gz: 9b122bdf03944415ad33ad4132ca81aabde72a232f6cd0d5ccc258b6c72ed090
5
5
  SHA512:
6
- metadata.gz: a519bee2c0a2a0bfb407fe9b609882709c29321826222482576d0959472c73e39c6b7dbbc492c738530c951aa9cc8e8cf971162d176f7c52f1b04ee69f27b2c8
7
- data.tar.gz: 954b121cfd5949fac4349ce3db307d3cb83a3e656765efaa9f0c33834158a3002466dd11fb00f7a3f7315ff31b6a69dfe19d920224acd9c1247ab4d6d7334c9f
6
+ metadata.gz: 937f5f8a8e1e34158253cc3aa5cddfbfd71b9428ea7732a1a7161076a02fa0d16e40f19d41833b01df7d936714f33e74c26137201aea91ff11d202377c61b130
7
+ data.tar.gz: '0082d507df96adcd2bd6f3057e78cfcbabb6eb72946dd1616b1322285146a2d77124dce74368a926a789fb56aed5a8c7138f302304be5a504becf8f5067981e6'
@@ -0,0 +1,32 @@
1
+ module Pod
2
+ class Config
3
+ attr_accessor :bb_idfa_flag
4
+ end
5
+ end
6
+
7
+ module Pod
8
+ class Installer
9
+ class Analyzer
10
+ class PodfileDependencyCache
11
+ alias_method :bb_origin_initialize, :initialize
12
+ def initialize(podfile_dependencies, dependencies_by_target_definition)
13
+ bb_origin_initialize(podfile_dependencies,dependencies_by_target_definition)
14
+
15
+ if @podfile_dependencies
16
+ @podfile_dependencies.each do |dep|
17
+ if dep.name.include?('/noidfa')
18
+ Pod::Config.instance.bb_idfa_flag = 'noidfa'
19
+ break
20
+ elsif dep.name.include?('/idfa')
21
+ Pod::Config.instance.bb_idfa_flag = 'idfa'
22
+ break
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+
@@ -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
@@ -1,3 +1,6 @@
1
+ # bbsadvert
2
+ require 'cocoapods-bb-PodAssistant/babybus/bbsadvert/podfile_dependency_cache.rb'
3
+
1
4
  #stable
2
5
  require 'cocoapods-bb-PodAssistant/command/stable'
3
6
  require 'cocoapods-bb-PodAssistant/babybus/stable/podfile-linkline'
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBbPodassistant
2
- VERSION = "0.2.6"
2
+ VERSION = "0.3.1"
3
3
  end
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.2.6
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-11 00:00:00.000000000 Z
11
+ date: 2024-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -90,6 +90,7 @@ files:
90
90
  - LICENSE.txt
91
91
  - README.md
92
92
  - lib/cocoapods-bb-PodAssistant.rb
93
+ - lib/cocoapods-bb-PodAssistant/babybus/bbsadvert/podfile_dependency_cache.rb
93
94
  - lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb
94
95
  - lib/cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper.rb
95
96
  - lib/cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks.rb