cocoapods-dongjia 1.1.3 → 1.1.4
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-dongjia/gem_version.rb +4 -3
- data/lib/cocoapods_plugin.rb +1 -0
- data/lib/dongjia_pods_iterator.rb +18 -0
- data/lib/dongjia_router.rb +2 -0
- data/lib/helper/Core/podfile/dsl.rb +16 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eadc1f8b16a2465ed7d8f1991550f1e0ab0ff0bbb450a26ea78b1eb3b839898
|
4
|
+
data.tar.gz: f7a945dc66e7f2473659f8fb5b65dc6b6dceccd3dce099b3ecc4cd2b3fe1ef58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 384450efd470d1e94ef3f6f6f8bce82f6d8dd1290ddc24b1a58f14dbfc537be27bb7d3aae79e9377cedc3487a75e17de8e63f1be184ec55cb647c1e638e39d62
|
7
|
+
data.tar.gz: 5ec1a4520caf8488b6ed8e4e400d3094d3fd53251b54fb28eb8aea151011215c62c01856eaffc221d465512ad5728493809552f85ac47bbc8ffdc0033f070382
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -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
|
|
data/lib/dongjia_router.rb
CHANGED
@@ -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.
|
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
|
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
|
-
-
|
105
|
-
-
|
105
|
+
- 优化 install! 方法参数兼容性
|
106
|
+
- 关闭 incomplete-umbrella 警告
|
107
|
+
- 将 umbrella 导出的头文件改为尖括号形式
|
106
108
|
post_install_message:
|
107
109
|
rdoc_options: []
|
108
110
|
require_paths:
|