podfileDep 2.1.1 → 2.1.3

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: d685c50ac91b5bc9100a895fe300df13c8d1f4ca29eec6cfd0d36c1e74edaf08
4
- data.tar.gz: 60365a5983ce3810316f3b72b061e38717dfbd1f4ae34838f395a90659c4f755
3
+ metadata.gz: b479368822acf20f1da58121068b5c6208414bbe3158bc582e437892319c44d8
4
+ data.tar.gz: 0504f3e3173a327cc8d87b3832cbcced33dddcd1a378678a065e5f2284c7cfda
5
5
  SHA512:
6
- metadata.gz: a3dc46f47e0a2f3fdff945c663396ae3f1727dd2a62f5c6e2c939be6d528f2045469c9bb73d75d6b27be317ec9aee34a1e6e7fe9509875d868df603579a9327d
7
- data.tar.gz: b0bcbd47cf7ecad5c0f19a597fb531708b2b31f4da06b2bdc885985901dac4b0276bb4f3ca85f5810f404feb7ff786ec2bdd2ac402f850ee48221e14b0aae1f1
6
+ metadata.gz: e1a08af8494a82cbd4dbfd51e81bddf386d4b0299392e6122ceefa8772d645c90139bc9f0ea6703badb30dfe42a4c44cd21ddca81ce5a1110f2e520093e74a31
7
+ data.tar.gz: 2b03e7f3f5ae2aeb178f03726cdba9d2c5f24d806cce25d544c453ad53d62e84ccc845c09a49f4b06708ee8e0294495854b11aa9c87781af2647c38725604546
data/CHANGELOG.md CHANGED
@@ -40,4 +40,12 @@
40
40
  -
41
41
  ## [2.1.1] - 2023-6-19
42
42
 
43
- - 移除不被引用的依赖在pod install时加速
43
+ - 移除不被引用的依赖在pod install时加速
44
+
45
+ ## [2.1.2] - 2023-6-19
46
+
47
+ - 被local文件引用的依赖 不移除
48
+
49
+ ## [2.1.3] - 2023-6-19
50
+
51
+ - 更新提示语修改
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PodfileDep
4
- VERSION = "2.1.1"
4
+ VERSION = "2.1.3"
5
5
  end
@@ -44,12 +44,10 @@ module Pod
44
44
  end
45
45
  class YamlManager
46
46
 
47
- # 缓存某个的依赖库
48
- # {{"module_nameA":["module_nameA", module_nameB]},}
49
- attr_accessor :local_yaml_dependencies
47
+ attr_accessor :local_yaml_deps
50
48
 
51
49
  def initialize
52
- @local_yaml_dependencies = {}
50
+ @local_yaml_deps = []
53
51
  end
54
52
 
55
53
  # 单例方法
@@ -84,7 +82,6 @@ module Pod
84
82
  # 读取yaml依赖
85
83
  yaml_dependencies = {}
86
84
  read_yaml_dependencies(podfile_third_party_yaml,false ,yaml_dependencies)
87
- local_yaml_dependencies = yaml_dependencies #这里记录下
88
85
  read_yaml_dependencies(podfile_module_yaml,false ,yaml_dependencies)
89
86
  read_yaml_dependencies(podfile_local_yaml,true ,yaml_dependencies)
90
87
 
@@ -220,7 +217,7 @@ module Pod
220
217
  available_keys = %w[module pod subspecs path podspec version git tag branch configurations inhibit_warnings source binary]
221
218
  dependency.each_key { |key|
222
219
  unless available_keys.include?(key)
223
- gem_name = "yaml_relies"
220
+ gem_name = "podfileDep"
224
221
  puts "❌ #{yaml_name}: 当前#{gem_name}版本(#{PodfileDep::VERSION})不支持字段#{key}"
225
222
  puts "请检查对应字段或尝试执行如下命令升级"
226
223
  puts "gem uninstall #{gem_name} && gem install #{gem_name}"
@@ -296,6 +293,11 @@ module Pod
296
293
  binary = dependency['binary'] ? !!dependency['binary'] : true
297
294
  version = (dependency['path'] or dependency['podspec']) ? nil :dependency['version']
298
295
 
296
+ # 记录
297
+ if yaml_name == Constants::PODFILE_LOCAL_YAML
298
+ self.local_yaml_deps << dependency['pod']
299
+ end
300
+
299
301
  # 生成依赖对象
300
302
  dependency = YamlRely.new(module_name = dependency['module'],
301
303
  pod = dependency['pod'],
@@ -367,7 +369,7 @@ module Pod
367
369
  end
368
370
 
369
371
  def local_yaml_contain(module_name)
370
- return local_yaml_dependencies.keys.include?(module_name)
372
+ local_yaml_deps.include?(module_name)
371
373
  end
372
374
 
373
375
  # 是否需要快速编译
@@ -399,7 +401,7 @@ module Pod
399
401
 
400
402
  content = ""
401
403
  content = content + "# 1、本依赖配置文件优先级最高, 用来覆盖其他两个依赖的yaml文件中的组件。 尝试打开以下注释, 修改对应字段, 然后执行pod install\n"
402
- content = content + "# 2、PODS下边的配置是数组形式, 如果有多个就写多个\n"
404
+ content = content + "# 2、PODS下边的配置是数组形式, 如果有多个就写多个(subspecs需要数组)\n"
403
405
  content = content + "# 3、本文件加入到忽略文件中\n\n"
404
406
 
405
407
  # content = content + "# QUICKBUILD字段如果为true, 则表示会自动解析所有组件的依赖, 并删除不被使用的依赖库, 以达到开发时快速编译的目的\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: podfileDep
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 王帅朋