cocoapods-bb-bin 0.1.1 → 0.1.5

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: fe2934d8f1194dc059fd28f6f72965ae1770b1d818dbfa21859fdb81d11bf750
4
- data.tar.gz: e23974f0b469458fb2cf9082c3aeba560395cef6bf69656070ad86aecae5e3db
3
+ metadata.gz: 92aac3b42f5f900aa8994380291b97a8794502bb6983d850ce3bf3dc4ef005ee
4
+ data.tar.gz: 7a103332b3845ba48a457b87a55e916afe4f8fe53e98e899a8f147e1785f90b7
5
5
  SHA512:
6
- metadata.gz: 77b296493acbe2d184ee3b5958a4c90e28cf88fec7d81675126d5291b9ee324980d363084f6b66180c59661e944aa9c9e383860ff46e326a15b15516c8d5288d
7
- data.tar.gz: 9496462c8286ce8f1535ca84387950328d0c27646fb7e3c884a514ee1b2ce912b0ae7258bb3c0bebcf93f27b05387e539d130e9bf76e1389dbf2ae3f60be3f76
6
+ metadata.gz: 6236774e980f7e3455944cf3cc825a0c270cde86f489c60a294cef5308c0d35ebea030f7e1ff142cd9e7b7a07ccd2e623d97dde99852d5215d6e03ccedc91960
7
+ data.tar.gz: fd318d8fe2f1a9c6b8bf749ebc0e13df80996b48b7435e33b206638b2908a2403a0d88a343acac3d1c43201befecc5f286fdfd907d8393c34ba5db6b9279d2c5
@@ -170,12 +170,12 @@ module Pod
170
170
  argvs += ['--use-podfile']
171
171
  end
172
172
 
173
- unless CBin::Build::Utils.uses_frameworks?
173
+ if CBin::Build::Utils.uses_frameworks? # 组件库重新生成pod工程引入静态库需要使用该选项,否则报cocoapods中verify_no_static_framework_transitive_dependencies验证无法通过 by hm 21/10/18
174
174
  argvs += ['--use-libraries']
175
175
  end
176
176
 
177
177
  argvs << spec_file if spec_file
178
-
178
+ UI.puts "argvs:#{argvs}"
179
179
  gen = Pod::Command::Gen.new(CLAide::ARGV.new(argvs))
180
180
  gen.validate!
181
181
  gen.run
@@ -203,6 +203,8 @@ module Pod
203
203
  return name
204
204
  end
205
205
 
206
+ private
207
+
206
208
  # podfile创建软链接
207
209
  def link_podfile
208
210
  current_path = Pathname.pwd
@@ -210,16 +212,37 @@ module Pod
210
212
  if filename == 'Podfile'
211
213
  filepath = File.join(current_path,"#{filename}")
212
214
  return filepath
215
+ else
216
+ if filename != "." and filename != ".."
217
+ filepath = File.join(current_path,"#{filename}")
218
+ if File.directory?(filepath)
219
+ # 二级目录遍历Podfile
220
+ Dir.foreach(filepath) do |filename|
221
+ if filename == 'Podfile'
222
+ podfile_path = File.join(filepath,"#{filename}")
223
+ create_link(podfile_path, current_path)
224
+ pods_path = File.join(filepath,"Pods")
225
+ create_link(pods_path, current_path)
226
+ return podfile_path
227
+ end
228
+ end
229
+ end
230
+ end
213
231
  end
214
232
  end
215
233
  # 没有找到podfile(小组件)
216
234
  podfile_path = File.join(current_path,"Example/Podfile")
217
235
  if File.file?(podfile_path)
218
- system("ln -s #{podfile_path} #{current_path}")
219
- UI.warn "创建软链接 podfile:#{podfile_path} link:#{current_path}"
236
+ create_link(podfile_path, current_path)
237
+ pods_path = File.join(current_path,"Example/Pods")
238
+ create_link(pods_path, current_path)
220
239
  end
221
240
  end
222
-
241
+
242
+ def create_link(source_file, dest_file)
243
+ system("ln -s #{source_file} #{dest_file}")
244
+ UI.puts "create link source:#{source_file} dest:#{dest_file}"
245
+ end
223
246
  end
224
247
  end
225
248
  end
@@ -94,7 +94,7 @@ module CBin
94
94
 
95
95
  def config
96
96
  @config ||= begin
97
- @config = OpenStruct.new load_config
97
+ @config = OpenStruct.new load_config
98
98
  validate!
99
99
  @config
100
100
  end
@@ -131,6 +131,4 @@ module CBin
131
131
  def self.config
132
132
  @config ||= Config.new
133
133
  end
134
-
135
-
136
134
  end
@@ -20,17 +20,18 @@ module CBin
20
20
  def load_build_config
21
21
  @white_pod_list = []
22
22
  @ignore_git_list = []
23
+ @ignore_http_list = []
23
24
  project_root = Pod::Config.instance.project_root
24
25
  path = File.join(project_root.to_s, 'BinArchive.json')
25
26
 
26
27
  if File.exist?(path)
27
28
  config = JSON.parse(File.read(path))
28
29
  @white_pod_list = config['archive-white-pod-list']
29
- UI.warn "====== archive-white-pod-list = #{@white_pod_list}" if @white_pod_list
30
+ UI.warn "====== white_pod_list = #{@white_pod_list}" if @white_pod_list
30
31
  @ignore_git_list = config['ignore-git-list']
31
32
  UI.warn "====== ignore_git_list = #{@ignore_git_list}" if @ignore_git_list
32
33
  @ignore_http_list = config['ignore-http-list']
33
-
34
+ UI.warn "====== ignore_http_list = #{@ignore_http_list}" if @ignore_http_list
34
35
  @xcode_build_name = config['xcode_build_path']
35
36
  @root_dir = config['root_dir'] unless config['root_dir'].nil?
36
37
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
 
6
6
  module Pod
@@ -56,6 +56,7 @@ module CBin
56
56
  build_static_framework
57
57
  unless @skip_archive
58
58
  unless CBin::Build::Utils.is_framework(@spec)
59
+ UI.puts "build static library"
59
60
  build_static_library
60
61
  zip_static_library
61
62
  else
@@ -10,6 +10,9 @@ module CBin
10
10
  if Utils.uses_frameworks?
11
11
  return true
12
12
  end
13
+ if Utils.is_generate_frameworks(spec)
14
+ return true
15
+ end
13
16
 
14
17
  return Utils.is_swift_module(spec)
15
18
  end
@@ -57,6 +60,23 @@ module CBin
57
60
  return uses_frameworks
58
61
  end
59
62
 
63
+ def Utils.is_generate_frameworks(spec)
64
+ # framework
65
+ zip_file = CBin::Config::Builder.instance.framework_zip_file(spec) + ".zip"
66
+ res = File.exist?(zip_file)
67
+ Pod::UI::puts "zip_file = #{zip_file}"
68
+ unless res
69
+ # xcframework
70
+ zip_file = CBin::Config::Builder.instance.xcframework_zip_file(spec) + ".zip"
71
+ res = File.exist?(zip_file)
72
+ Pod::UI::puts "zip_file = #{zip_file}"
73
+ end
74
+ if res
75
+ is_framework = true
76
+ end
77
+ return is_framework
78
+ end
79
+
60
80
  end
61
81
 
62
82
  end
@@ -10,9 +10,10 @@ module CBin
10
10
  attr_reader :swift_module_path
11
11
  attr_reader :fwk_path
12
12
 
13
- def initialize(name, platform)
13
+ def initialize(name, platform, embedded=false)
14
14
  @name = name
15
15
  @platform = platform
16
+ @embedded = embedded
16
17
  end
17
18
 
18
19
  def make
@@ -79,6 +80,11 @@ module CBin
79
80
 
80
81
  def make_root
81
82
  @root_path = Pathname.new(@platform)
83
+
84
+ if @embedded
85
+ @root_path += Pathname.new(@name + '.embeddedframework')
86
+ end
87
+
82
88
  @root_path.mkpath unless @root_path.exist?
83
89
  end
84
90
  end
@@ -42,10 +42,11 @@ module CBin
42
42
 
43
43
  UI.puts "framework lipo build"
44
44
 
45
- if CBin::Build::Utils.is_swift_module(@spec) || !CBin::Build::Utils.uses_frameworks?
45
+ # if CBin::Build::Utils.is_swift_module(@spec) || !CBin::Build::Utils.uses_frameworks?
46
+ if CBin::Build::Utils.is_framework(@spec) # 默认生成framework为静态库.a
46
47
  UI.section("Building static Library #{@spec}") do
47
48
  # defines = compile
48
- UI.puts "swift framework lipo build"
49
+ UI.puts "static framework lipo build"
49
50
  # build_sim_libraries(defines)
50
51
  output = framework.versions_path + Pathname.new(@spec.name)
51
52
 
@@ -22,8 +22,10 @@ module CBin
22
22
  def create
23
23
  # spec = nil
24
24
  if CBin::Build::Utils.is_framework(@code_spec)
25
+ Pod::UI::puts "make framework spec"
25
26
  spec = create_framework_from_code_spec
26
27
  else
28
+ Pod::UI::puts "make source code spec"
27
29
  spec = create_from_code_spec
28
30
  end
29
31
 
@@ -22,9 +22,10 @@ module Pod
22
22
  def podfile_for_spec(spec)
23
23
  generator = self
24
24
  dir = configuration.gen_dir_for_pod(spec.name)
25
+ project_name = configuration.project_name_for_spec(spec)
25
26
 
26
27
  Pod::Podfile.new do
27
- project "#{spec.name}.xcodeproj"
28
+ project "#{project_name}.xcodeproj"
28
29
  workspace "#{spec.name}.xcworkspace"
29
30
 
30
31
  plugin 'cocoapods-generate'
@@ -101,16 +102,16 @@ module Pod
101
102
 
102
103
 
103
104
  inhibit_all_warnings! if generator.inhibit_all_warnings?
104
- use_modular_headers! if generator.use_modular_headers?
105
+ # use_modular_headers! if generator.use_modular_headers?
106
+ # podfile 配置 use_frameworks! :linkage => :static 支持modulemap by hm 21/10/19
107
+ if generator.use_modular_headers? || generator.use_frameworks_value.to_s == '{:linkage=>:static}'
108
+ use_modular_headers!
109
+ end
105
110
 
106
111
  # This is the pod declaration for the local pod,
107
112
  # it will be inherited by the concrete target definitions below
108
-
109
113
  pod_options = generator.dependency_compilation_kwargs(spec.name)
110
114
  pod_options[:path] = spec.defined_in_file.relative_path_from(dir).to_s
111
- # generator.configuration.podfile.dependencies[0].external_source
112
-
113
-
114
115
  { testspecs: test_specs, appspecs: app_specs }.each do |key, specs|
115
116
  pod_options[key] = specs.map { |s| s.name.sub(%r{^#{Regexp.escape spec.root.name}/}, '') }.sort unless specs.empty?
116
117
  end
@@ -196,4 +197,3 @@ module Pod
196
197
  end
197
198
  end
198
199
  end
199
-
@@ -6,7 +6,7 @@ Pod::HooksManager.register('cocoapods-bb-bin', :pre_install) do |_context, _|
6
6
  require 'cocoapods-bb-bin/native'
7
7
 
8
8
  #pod bin update || install 不走这里
9
- if $ARGV[1] = 'update' || $ARGV[1] != 'install'
9
+ if $ARGV[1] == 'update' || $ARGV[1] != 'install'
10
10
 
11
11
  else
12
12
  # pod bin repo update 更新二进制私有源
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -62,16 +62,16 @@ dependencies:
62
62
  name: cocoapods-bb-xcframework
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '0'
67
+ version: '1.0'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: '1.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: bundler
77
77
  requirement: !ruby/object:Gem::Requirement