cocoapods-binary-flutter 0.0.14 → 0.0.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f95bbd36fb8dc07ffe9ca132391e849495936baf94dbe3954d11a902863bd6
|
4
|
+
data.tar.gz: c7cb7ddc270f0ca277327e7c9d7206215c3bf160ffd61b67f833a3832870d01a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd610e02bfdd03001d1cceb41ba82129e4a9e7fc37333cf2e0b099dc8e50e5d86e36f4bbdfeecaef256755d8c3d8471e3436d0afd6aa67aa23f1be49f73bcd8
|
7
|
+
data.tar.gz: 4fe58e03b0f477616689c8bc6204d99bbb875cd132d7259631695d0baf519828e375d5e470e0f078b33cc23ff77a75254ba409d340e3c053f426ebfc0c8684d6
|
@@ -33,22 +33,23 @@ module Pod
|
|
33
33
|
flutter_binary_home = flutter_f_home+md5value
|
34
34
|
flutter_binary_path = flutter_binary_home+'/binary'
|
35
35
|
|
36
|
-
|
37
|
-
FileUtils.mkdir_p(flutter_binary_home)
|
36
|
+
# 创建目录(如果不存在)
|
37
|
+
FileUtils.mkdir_p(flutter_binary_home) unless Dir.exist?(flutter_binary_home)
|
38
38
|
|
39
|
-
|
40
|
-
Dir.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
# 获取flutter_f_home目录下的所有子目录
|
40
|
+
subdirectories = Dir.entries(flutter_f_home).select { |entry| File.directory?(File.join(flutter_f_home, entry)) && !(entry =='.' || entry == '..' || entry == '.DS_Store') }
|
41
|
+
|
42
|
+
# 清除超过30天的缓存只有当子目录数量大于5个时才执行
|
43
|
+
if subdirectories.length > 5
|
44
|
+
subdirectories.each do |subdirectory|
|
45
|
+
next if subdirectory == md5value # 跳过flutter_binary_home目录
|
46
|
+
dirpath = File.join(flutter_f_home, subdirectory)
|
45
47
|
a = File.mtime(dirpath)
|
46
|
-
t = Time.
|
47
|
-
if (t-a).round/60/60/24 > 30
|
48
|
+
t = Time.now
|
49
|
+
if (t - a).round / 60 / 60 / 24 > 30
|
48
50
|
FileUtils.remove_dir(dirpath)
|
49
51
|
end
|
50
|
-
end
|
51
|
-
|
52
|
+
end
|
52
53
|
end
|
53
54
|
|
54
55
|
#下载解压
|
@@ -142,7 +143,20 @@ module Pod
|
|
142
143
|
Dir.foreach(ios_plugins_directory_pathname) do |item|
|
143
144
|
next if item == '.' or item == '..' or File::directory?(File.join(ios_plugins_directory_pathname, item)) == false
|
144
145
|
# do work on real items
|
145
|
-
|
146
|
+
ios_path = File.join(ios_plugins_directory_pathname, item, 'ios')
|
147
|
+
darwin_path = File.join(ios_plugins_directory_pathname, item, 'darwin')
|
148
|
+
if File.exist?(ios_path)
|
149
|
+
# 执行逻辑:存在 ios 目录
|
150
|
+
pod item, path: ios_path, inhibit_warnings: true
|
151
|
+
elsif File.exist?(darwin_path)
|
152
|
+
# 执行逻辑:存在 darwin 目录
|
153
|
+
pod item, path: darwin_path, inhibit_warnings: true
|
154
|
+
else
|
155
|
+
# 抛出异常:插件依赖解析失败
|
156
|
+
error_message = "插件依赖解析失败: #{item}"
|
157
|
+
puts error_message
|
158
|
+
raise error_message
|
159
|
+
end
|
146
160
|
end
|
147
161
|
end
|
148
162
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-binary-flutter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|