cocoapods-meitu-bin 1.4.1 → 2.0.0
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-meitu-bin/command/bin.rb +0 -1
- data/lib/cocoapods-meitu-bin/config/config.rb +1 -0
- data/lib/cocoapods-meitu-bin/gem_version.rb +1 -1
- data/lib/cocoapods-meitu-bin/helpers/buildAll/builder.rb +16 -15
- data/lib/cocoapods-meitu-bin/helpers/buildAll/podspec_util.rb +1 -1
- data/lib/cocoapods-meitu-bin/native/installation_options.rb +4 -0
- data/lib/cocoapods-meitu-bin/native/pod_source_installer.rb +11 -8
- metadata +2 -3
- data/lib/cocoapods-meitu-bin/native/verify.rb +0 -107
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86aab10f2c27b3bfbdf44ed3b6874b7d6be473bb91dcd8a51c0e5906547d48e6
|
4
|
+
data.tar.gz: a3b0f074a9ee8c24c8043c558314ea3bdfc3b28d1513e87909717547819b8460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '088de3a018fda2b6b9215b61a26e101881fd4ca2a5a1f2ec9c4a9a4773b4ac3d11c4cd880a4ee979fc776a76bb54fcada03ae198b7dc14096903ee8d43a78f1c'
|
7
|
+
data.tar.gz: 7bf240596cded061b4dc3f86006c4e47f4fa9d5613a37b9d2655943ad8c980930e639159737fcd5f4ec5d7564cb5deecf7918ccfacaaf03257bb8a72a1026763
|
@@ -16,7 +16,6 @@ require 'cocoapods-meitu-bin/command/bin/source'
|
|
16
16
|
require 'cocoapods-meitu-bin/helpers'
|
17
17
|
require 'cocoapods-meitu-bin/helpers/framework_builder'
|
18
18
|
require 'cocoapods-meitu-bin/native/clean'
|
19
|
-
require 'cocoapods-meitu-bin/native/verify'
|
20
19
|
module Pod
|
21
20
|
class Command
|
22
21
|
# This is an example of a cocoapods plugin adding a top-level subcommand
|
@@ -352,23 +352,24 @@ ibtool \
|
|
352
352
|
fwks_dir = "#{result_product_dir}/fwks"
|
353
353
|
FileUtils.mkdir(fwks_dir) unless File.exist?(fwks_dir)
|
354
354
|
fwks.map do |fwk|
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
end
|
363
|
-
def get_XCFrameworkIntermediates_path(path)
|
364
|
-
# 使用正则表达式匹配并提取 AdsFramework
|
365
|
-
match = path.to_s.match(/\/([^\/]+)\.xcframework/)
|
366
|
-
if match
|
367
|
-
framework_path = "#{product_dir}/#{iphoneos}/XCFrameworkIntermediates/#{match[1]}/#{match[1]}.framework"
|
368
|
-
return framework_path
|
355
|
+
`rsync -av #{fwk} #{fwks_dir}`
|
356
|
+
# new_fwk = get_XCFrameworkIntermediates_path(fwk)
|
357
|
+
# if new_fwk && File.exist?(new_fwk)
|
358
|
+
# `rsync -av #{new_fwk} #{fwks_dir}`
|
359
|
+
# else
|
360
|
+
# `rsync -av #{fwk} #{fwks_dir}`
|
361
|
+
# end
|
369
362
|
end
|
370
|
-
return nil
|
371
363
|
end
|
364
|
+
# def get_XCFrameworkIntermediates_path(path)
|
365
|
+
# # 使用正则表达式匹配并提取 AdsFramework
|
366
|
+
# match = path.to_s.match(/\/([^\/]+)\.xcframework/)
|
367
|
+
# if match
|
368
|
+
# framework_path = "#{product_dir}/#{iphoneos}/XCFrameworkIntermediates/#{match[1]}/#{match[1]}.framework"
|
369
|
+
# return framework_path
|
370
|
+
# end
|
371
|
+
# return nil
|
372
|
+
# end
|
372
373
|
|
373
374
|
# 拷贝 framework
|
374
375
|
def copy_framework
|
@@ -27,7 +27,7 @@ module CBin
|
|
27
27
|
# 处理vendored_libraries和vendored_frameworks
|
28
28
|
spec['vendored_libraries'] = "#{root_dir}/libs/*.a"
|
29
29
|
#兼容.xcframework
|
30
|
-
spec['vendored_frameworks'] = %W[#{root_dir} #{root_dir}/fwks/*.framework]
|
30
|
+
spec['vendored_frameworks'] = %W[#{root_dir} #{root_dir}/fwks/*.{framework,xcframework}]
|
31
31
|
# 处理资源
|
32
32
|
resources = %W[#{root_dir}/*.{#{special_resource_exts.join(',')}} #{root_dir}/resources/*]
|
33
33
|
spec['resources'] = resources
|
@@ -6,14 +6,17 @@ module Pod
|
|
6
6
|
class Installer
|
7
7
|
class PodSourceInstaller
|
8
8
|
attr_accessor :installation_options
|
9
|
-
|
10
|
-
alias old_verify_source_is_secure verify_source_is_secure
|
11
|
-
def verify_source_is_secure(root_spec)
|
12
|
-
# http source 默认不警告
|
13
|
-
if installation_options.warn_for_unsecure_source?
|
14
|
-
old_verify_source_is_secure(root_spec)
|
15
|
-
end
|
16
|
-
end
|
17
9
|
end
|
10
|
+
# class PodSourceDownloader
|
11
|
+
# attr_accessor :installation_options
|
12
|
+
#
|
13
|
+
# alias old_verify_source_is_secure verify_source_is_secure
|
14
|
+
# def verify_source_is_secure(root_spec)
|
15
|
+
# # http source 默认不警告
|
16
|
+
# if installation_options.warn_for_unsecure_source?
|
17
|
+
# old_verify_source_is_secure(root_spec)
|
18
|
+
# end
|
19
|
+
# end
|
20
|
+
# end
|
18
21
|
end
|
19
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-meitu-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -164,7 +164,6 @@ files:
|
|
164
164
|
- lib/cocoapods-meitu-bin/native/specification.rb
|
165
165
|
- lib/cocoapods-meitu-bin/native/target_validator.rb
|
166
166
|
- lib/cocoapods-meitu-bin/native/validator.rb
|
167
|
-
- lib/cocoapods-meitu-bin/native/verify.rb
|
168
167
|
- lib/cocoapods-meitu-bin/source_provider_hook.rb
|
169
168
|
- lib/cocoapods_plugin.rb
|
170
169
|
- spec/command/bin_spec.rb
|
@@ -1,107 +0,0 @@
|
|
1
|
-
# 用于效验podfile相关准确性
|
2
|
-
module Pod
|
3
|
-
class Command
|
4
|
-
class Bin < Command
|
5
|
-
class Verify < Bin
|
6
|
-
# self.abstract_command = true
|
7
|
-
self.summary = '效验podfile相关准确性'
|
8
|
-
self.description = <<-DESC
|
9
|
-
#{summary},效验podfile相关准确性
|
10
|
-
DESC
|
11
|
-
|
12
|
-
def self.options
|
13
|
-
[
|
14
|
-
%w[--verify-podfile podfile是否正确且相关依赖正常],
|
15
|
-
%w[--verify-podfile-branch 效验podfile是否包含:branch=>'xxx'语法],
|
16
|
-
].concat(super).uniq
|
17
|
-
end
|
18
|
-
|
19
|
-
def initialize(argv)
|
20
|
-
@verify_podfile = argv.flag?('verify-podfile', false)
|
21
|
-
@verify_podfile_branch = argv.flag?('verify-podfile-branch', false)
|
22
|
-
super
|
23
|
-
end
|
24
|
-
|
25
|
-
def run
|
26
|
-
# Pod::UI.puts "共删除#{size}二进制版本pod缓存".red
|
27
|
-
|
28
|
-
if @verify_podfile
|
29
|
-
analyzing_dependencies
|
30
|
-
end
|
31
|
-
if @verify_podfile_branch
|
32
|
-
verify_podfile_branch
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
def verify_podfile
|
38
|
-
begin
|
39
|
-
podfile
|
40
|
-
rescue Pod::DSLError => error
|
41
|
-
info ="podfile文件效验失败:#{error}"
|
42
|
-
raise Pod::DSLError.new(info, path, error, contents)
|
43
|
-
end
|
44
|
-
begin
|
45
|
-
analyzing_dependencies
|
46
|
-
rescue Pod::DSLError => error
|
47
|
-
# puts "podfile依赖分析失败:#{error}"
|
48
|
-
info = "podfile依赖分析失败:#{error}"
|
49
|
-
raise Pod::DSLError.new(info, path, error, contents)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
def verify_podfile_branch
|
53
|
-
begin
|
54
|
-
podfile
|
55
|
-
rescue Pod::DSLError => error
|
56
|
-
info = "podfile文件效验失败:#{error.message}"
|
57
|
-
raise Pod::DSLError.new(info, path, error, contents)
|
58
|
-
end
|
59
|
-
podfile_obj = podfile
|
60
|
-
branch_list = []
|
61
|
-
podfile_obj.target_definitions.each do |target_name, target_definition|
|
62
|
-
target_definition.dependencies.each do |dependency|
|
63
|
-
if dependency.external_source
|
64
|
-
if dependency.external_source[:branch]
|
65
|
-
branch = dependency.external_source[:branch]
|
66
|
-
branch_list << "#{dependency.name}:#{branch}"
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
if branch_list.count > 0
|
72
|
-
Pod::UI.puts "podfile包含以下branch:#{branch_list}".red
|
73
|
-
Pod::UI.puts "请检查podfile是否包含 :branch => 'xxx' 语法".red
|
74
|
-
|
75
|
-
raise Pod::DSLError.new("合入develop分支不能使用branch,podfile包含branch,请检查:#{branch_list}", nil, nil, nil)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
def analyzing_dependencies
|
79
|
-
analyzer = Pod::Installer::Analyzer.new(
|
80
|
-
sandbox,
|
81
|
-
podfile,
|
82
|
-
lockfile
|
83
|
-
)
|
84
|
-
analyzer.update_repositories
|
85
|
-
analyzer.analyze(true)
|
86
|
-
end
|
87
|
-
def podfile
|
88
|
-
@podfile ||= Pod::Config.instance.podfile
|
89
|
-
end
|
90
|
-
|
91
|
-
# 获取 podfile.lock
|
92
|
-
def lockfile
|
93
|
-
@lockfile ||= Pod::Config.instance.lockfile
|
94
|
-
end
|
95
|
-
|
96
|
-
# 获取 sandbox
|
97
|
-
def sandbox
|
98
|
-
@sandbox ||= Pod::Config.instance.sandbox
|
99
|
-
end
|
100
|
-
def clean_all_binary
|
101
|
-
# Your method implementation here
|
102
|
-
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|