cocoapods-dongjia 1.1.3 → 1.1.4

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: 19bfbd3d41dff99206d19c1e1a0ebc05dd3670a1fda433819997a65d4a3056e7
4
- data.tar.gz: 2efb8d3a2756146053879dde844087c78a6ecad2731520dd9b67046f22d24b6b
3
+ metadata.gz: 2eadc1f8b16a2465ed7d8f1991550f1e0ab0ff0bbb450a26ea78b1eb3b839898
4
+ data.tar.gz: f7a945dc66e7f2473659f8fb5b65dc6b6dceccd3dce099b3ecc4cd2b3fe1ef58
5
5
  SHA512:
6
- metadata.gz: b815fc7ebf07f4bb4ae6cabfbd9e612ebfb72947a65462e23f92f47f949b6e977651ff501dc2472220bc42ec3ae919af108182f5c91a5f852f4ec91371582f8c
7
- data.tar.gz: 85ecf4879e0be71ca0c17060799c2d90f7381de6863ff955c5d83b5e3b615bed07cbeb247ce773c612ec3c663ff0639ab584e9ad11f0ebf47efc0f81c50d3df5
6
+ metadata.gz: 384450efd470d1e94ef3f6f6f8bce82f6d8dd1290ddc24b1a58f14dbfc537be27bb7d3aae79e9377cedc3487a75e17de8e63f1be184ec55cb647c1e638e39d62
7
+ data.tar.gz: 5ec1a4520caf8488b6ed8e4e400d3094d3fd53251b54fb28eb8aea151011215c62c01856eaffc221d465512ad5728493809552f85ac47bbc8ffdc0033f070382
@@ -1,7 +1,8 @@
1
1
  module CocoapodsDongjia
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  UPDATE_DESC = <<-EOS
4
- - 兼容 Xcode 12 工程设置
5
- - 增加 release 命令
4
+ - 优化 install! 方法参数兼容性
5
+ - 关闭 incomplete-umbrella 警告
6
+ - 将 umbrella 导出的头文件改为尖括号形式
6
7
  EOS
7
8
  end
@@ -9,6 +9,7 @@ require_relative 'dongjia_scheme_manager'
9
9
  require_relative 'helper/podfile'
10
10
  require_relative 'helper/podfile_options'
11
11
  require_relative 'helper/podfile_warnings'
12
+ require_relative 'helper/Core/podfile/dsl'
12
13
 
13
14
  module Dongjia
14
15
 
@@ -31,6 +31,10 @@ module Dongjia
31
31
 
32
32
  # 关闭 bitcode
33
33
  config.build_settings['ENABLE_BITCODE'] = "NO"
34
+
35
+ # 忽略 incomplete-umbrella 警告
36
+ config.build_settings['OTHER_CFLAGS'] ||= ['$(inherited)']
37
+ config.build_settings['OTHER_CFLAGS'] << '"-Wno-incomplete-umbrella"'
34
38
  end
35
39
 
36
40
  # 打开 LTO
@@ -38,6 +42,19 @@ module Dongjia
38
42
  config.build_settings['LLVM_LTO'] = 'YES_THIN' if config.name == 'Release'
39
43
  end
40
44
 
45
+ # 将 umbrella 导出的头文件改为尖括号形式
46
+ def self.convert_umbrella_header_import(pod_name)
47
+ umbrella_path = "./Pods/Target Support Files/#{pod_name}/#{pod_name}-umbrella.h"
48
+ return unless File.exist?(umbrella_path)
49
+ File.open(umbrella_path, 'r+') do |f|
50
+ x = f.read
51
+ begin x.gsub!("#import \"#{pod_name}/", "#import <#{pod_name}/").gsub!('.h"', '.h>') rescue nil end
52
+ begin x.gsub!('#import "', "#import <#{pod_name}/").gsub!('.h"', '.h>') rescue nil end
53
+ f.rewind
54
+ f.write(x)
55
+ end
56
+ end
57
+
41
58
  # 遍历所有 Pod 工程配置
42
59
  def self.iterate(params, sandbox_root)
43
60
  turn_off_warnings = params[:turn_off_warnings]
@@ -63,6 +80,7 @@ module Dongjia
63
80
  target.build_configurations.each do | config |
64
81
  disable_warnings(config, target.name) if turn_off_warnings
65
82
  enable_lto(config) if lto_enabled
83
+ convert_umbrella_header_import(target.name)
66
84
  end
67
85
  end
68
86
 
@@ -14,6 +14,8 @@ module Dongjia
14
14
 
15
15
  注意:此处的实现仅供查看,如需修改,请点击对应的 _redirect{type} 方法跳转至对应的实现
16
16
 
17
+ 跳转定义文档:https://cf.idongjia.cn/pages/viewpage.action?pageId=57351032
18
+
17
19
  */
18
20
 
19
21
 
@@ -0,0 +1,16 @@
1
+ module Pod
2
+ class Podfile
3
+ module DSL
4
+ # Hook Podfile 中的 install: 方法,将当前版本 Cocoapods 不支持的 option 剔除
5
+ original_install = instance_method(:install!)
6
+ define_method(:install!) do |installation_method, options = {}|
7
+ all_options = Installer::InstallationOptions::all_options
8
+ valid_options = {}
9
+ options.each do |k, v|
10
+ valid_options.merge!({k => v}) if all_options.include?(k.to_s)
11
+ end
12
+ original_install.bind(self).(installation_method, valid_options)
13
+ end
14
+ end
15
+ end
16
+ 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.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiangzhuoyi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,6 +90,7 @@ files:
90
90
  - lib/dongjia_router.rb
91
91
  - lib/dongjia_scheme_manager.rb
92
92
  - lib/dongjia_source.rb
93
+ - lib/helper/Core/podfile/dsl.rb
93
94
  - lib/helper/dongjia_version_checker.rb
94
95
  - lib/helper/pod.rb
95
96
  - lib/helper/podfile.rb
@@ -101,8 +102,9 @@ licenses:
101
102
  - MIT
102
103
  metadata:
103
104
  update_desc: |2
104
- - 兼容 Xcode 12 工程设置
105
- - 增加 release 命令
105
+ - 优化 install! 方法参数兼容性
106
+ - 关闭 incomplete-umbrella 警告
107
+ - 将 umbrella 导出的头文件改为尖括号形式
106
108
  post_install_message:
107
109
  rdoc_options: []
108
110
  require_paths: