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 +4 -4
- data/lib/cocoapods-bb-bin/command/bin/archive.rb +2 -2
- data/lib/cocoapods-bb-bin/command/bin/auto.rb +26 -3
- data/lib/cocoapods-bb-bin/config/config.rb +1 -3
- data/lib/cocoapods-bb-bin/config/config_builder.rb +3 -2
- data/lib/cocoapods-bb-bin/gem_version.rb +1 -1
- data/lib/cocoapods-bb-bin/helpers/build_helper.rb +1 -0
- data/lib/cocoapods-bb-bin/helpers/build_utils.rb +20 -0
- data/lib/cocoapods-bb-bin/helpers/framework.rb +7 -1
- data/lib/cocoapods-bb-bin/helpers/framework_builder.rb +3 -2
- data/lib/cocoapods-bb-bin/helpers/spec_source_creator.rb +2 -0
- data/lib/cocoapods-bb-bin/native/podfile_generator.rb +7 -7
- data/lib/cocoapods-bb-bin/source_provider_hook.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92aac3b42f5f900aa8994380291b97a8794502bb6983d850ce3bf3dc4ef005ee
|
4
|
+
data.tar.gz: 7a103332b3845ba48a457b87a55e916afe4f8fe53e98e899a8f147e1785f90b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
219
|
-
|
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
|
-
|
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 "======
|
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
|
@@ -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 "
|
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 "#{
|
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]
|
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.
|
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-
|
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
|