cocoapods-dongjia 1.0.5 → 1.0.6

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: 43abbc7eeff4ae649d1d4581e3ba108bd4caad1c232c13e8f7b0a4ebe4e32cbf
4
- data.tar.gz: 7f09d83e057197460ac3fb6990a6ebacbbc589ff8f9cd45735501bab620f3cd4
3
+ metadata.gz: a829a90d465f2fa2b516712ac1edfe3f506688d30e664baf293648d7e507422f
4
+ data.tar.gz: e9a465b31fc018f93536c558a27556607f7f4209ce0a6489f6729a858cb76fa4
5
5
  SHA512:
6
- metadata.gz: e4fbc1904a6438e2cb5e1886da95e95398e35eab4031e047771ce2132c48d8a185513710d4eabe38f81670eda1aca63298d7ac72dd29c8413e143152bae35e1f
7
- data.tar.gz: 6832e07fde081a35ae4b1e8018e519339e312415f86570ade288fb3dd027467c780482e69ba2dbb70bb3b50db388efc597df6d7db6b741d06a54aaa66782ce56
6
+ metadata.gz: d46f8cf9df65533ab6430e4cde63c8b10786390736053019f7e6f38c77fcac95c8de92b758668f41fc2a10d299f1a7d055898889e9698d813a941e650622f0d7
7
+ data.tar.gz: b78824e850caf6f19aef7a713ad3a3f7a6ab144349abe26ac723b228f9e5f372976a520db6b644e6277b5f9a3f5400d14df134e3e160d4581c004c5a8e783c31
@@ -1,8 +1,6 @@
1
1
  module CocoapodsDongjia
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  UPDATE_DESC = <<-EOS
4
- - 修复警告关闭逻辑
5
- - 禁用 pod 工程的 bitcode
6
- - 修复引用错误
4
+ - 关闭静态框架依赖传递的校验
7
5
  EOS
8
6
  end
@@ -1,6 +1,7 @@
1
1
  require 'cocoapods-dongjia/command'
2
2
  require_relative 'dongjia_source'
3
- require_relative 'dongjia_inspector'
3
+ require_relative 'dongjia_branch_inspector'
4
+ require_relative 'dongjia_enterprise_inspector'
4
5
  require_relative 'dongjia_warning_manager'
5
6
 
6
7
  require_relative 'helper/podfile_local_importer'
@@ -19,16 +20,23 @@ module Dongjia
19
20
  # 设置是否使用私有源 [http://code.kaipao.cc/ios-team/DJSpecs]
20
21
  DongjiaSource.import(params[:use_private_source], podfile)
21
22
 
23
+ # 关闭静态框架依赖传递的校验
24
+ Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
25
+
22
26
  end
23
27
 
24
28
  Pod::HooksManager.register('cocoapods-dongjia', :post_install) do |ctx, params|
25
29
 
26
30
  # 关闭工程内的一些警告
27
- DongjiaWarningManager.turn_off_warnings(
31
+ WarningManager.turn_off_warnings(
28
32
  params[:turn_off_warnings],
29
33
  ctx.sandbox_root
30
34
  )
31
35
 
36
+ # 企业版文件引用校验
37
+ files = EnterpriseInspector.inspect()
38
+ Pod::UI.warn "文件未加入企业版:#{files}" if files.count > 0
39
+
32
40
  end
33
41
 
34
42
  end
@@ -0,0 +1,47 @@
1
+ require 'xcodeproj'
2
+
3
+ module Dongjia
4
+
5
+ class EnterpriseInspector
6
+
7
+ # 校验 东家 和 东家企业版 的文件
8
+ def self.inspect()
9
+
10
+ project_path = File.join(Dir.pwd, '东家.xcodeproj')
11
+
12
+ if !File.exist?(project_path)
13
+ return []
14
+ end
15
+
16
+ proj = Xcodeproj::Project.open(project_path)
17
+
18
+ target_dongjia = nil
19
+ target_dongjia_ent = nil
20
+
21
+ proj.targets.each do |target|
22
+ if target.name == '东家'
23
+ target_dongjia = target
24
+ elsif target.name == '东家企业版'
25
+ target_dongjia_ent = target
26
+ end
27
+ end
28
+
29
+ if target_dongjia == nil or target_dongjia_ent == nil
30
+ return []
31
+ end
32
+
33
+ mismatched_files = []
34
+
35
+ for file_ref in target_dongjia.source_build_phase.files_references
36
+ if !target_dongjia_ent.source_build_phase.include?(file_ref)
37
+ mismatched_files << file_ref.display_name
38
+ end
39
+ end
40
+
41
+ mismatched_files
42
+
43
+ end
44
+
45
+ end
46
+
47
+ end
@@ -2,7 +2,7 @@ require 'xcodeproj'
2
2
 
3
3
  module Dongjia
4
4
 
5
- class DongjiaWarningManager
5
+ class WarningManager
6
6
 
7
7
  def self.turn_off_warnings(turn_off, sandbox_root)
8
8
 
@@ -16,9 +16,10 @@ module Dongjia
16
16
 
17
17
  if v < latest_version
18
18
  update_desc = info['metadata']['update_desc']
19
- Pod::UI.warn "cocoapods-dongjia #{latest_version} is available."
20
- Pod::UI.warn "#{update_desc}"
21
- Pod::UI.warn "to upgrade: [sudo] gem install cocoapods-dongjia"
19
+ warnings = "cocoapods-dongjia #{latest_version} is available.\n\n"
20
+ warnings << update_desc << "\n"
21
+ warnings << "To upgrade: [sudo] gem install cocoapods-dongjia\n"
22
+ Pod::UI.warn warnings
22
23
  end
23
24
  rescue
24
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-dongjia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiangzhuoyi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-22 00:00:00.000000000 Z
11
+ date: 2019-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -64,7 +64,8 @@ files:
64
64
  - lib/cocoapods-dongjia/command/dongjia.rb
65
65
  - lib/cocoapods-dongjia/gem_version.rb
66
66
  - lib/cocoapods_plugin.rb
67
- - lib/dongjia_inspector.rb
67
+ - lib/dongjia_branch_inspector.rb
68
+ - lib/dongjia_enterprise_inspector.rb
68
69
  - lib/dongjia_source.rb
69
70
  - lib/dongjia_warning_manager.rb
70
71
  - lib/helper/dongjia_version_checker.rb
@@ -76,10 +77,7 @@ homepage: https://github.com/EXAMPLE/cocoapods-dongjia
76
77
  licenses:
77
78
  - MIT
78
79
  metadata:
79
- update_desc: |2
80
- - 修复警告关闭逻辑
81
- - 禁用 pod 工程的 bitcode
82
- - 修复引用错误
80
+ update_desc: " - 关闭静态框架依赖传递的校验\n"
83
81
  post_install_message:
84
82
  rdoc_options: []
85
83
  require_paths: