cocoapods-dongjia 1.1.2 → 1.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 +4 -4
- data/lib/cocoapods-dongjia/command.rb +1 -0
- data/lib/cocoapods-dongjia/command/release.rb +40 -0
- data/lib/cocoapods-dongjia/command/strip.rb +9 -5
- data/lib/cocoapods-dongjia/gem_version.rb +3 -3
- data/lib/cocoapods_plugin.rb +1 -1
- data/lib/dongjia_pods_iterator.rb +7 -7
- data/lib/helper/podfile.rb +60 -0
- metadata +7 -6
- data/lib/helper/podfile_local_importer.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19bfbd3d41dff99206d19c1e1a0ebc05dd3670a1fda433819997a65d4a3056e7
|
4
|
+
data.tar.gz: 2efb8d3a2756146053879dde844087c78a6ecad2731520dd9b67046f22d24b6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b815fc7ebf07f4bb4ae6cabfbd9e612ebfb72947a65462e23f92f47f949b6e977651ff501dc2472220bc42ec3ae919af108182f5c91a5f852f4ec91371582f8c
|
7
|
+
data.tar.gz: 85ecf4879e0be71ca0c17060799c2d90f7381de6863ff955c5d83b5e3b615bed07cbeb247ce773c612ec3c663ff0639ab584e9ad11f0ebf47efc0f81c50d3df5
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'cocoapods'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
|
5
|
+
class Podfile
|
6
|
+
@@is_release_mode = false
|
7
|
+
def self.set_is_release_mode(mode)
|
8
|
+
@@is_release_mode = mode
|
9
|
+
end
|
10
|
+
def self.is_release_mode?
|
11
|
+
@@is_release_mode
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Command
|
16
|
+
|
17
|
+
class Release < Command
|
18
|
+
|
19
|
+
self.summary = '以 release 模式集成 pods'
|
20
|
+
|
21
|
+
self.description = <<-DESC
|
22
|
+
|
23
|
+
以 release 模式集成 Pods
|
24
|
+
|
25
|
+
可以在 Podfile 中通过 @@debug_only_pods = [pod_name] 的方式指定 debug 模式下的 Pod
|
26
|
+
|
27
|
+
当执行 pod release 时,会自动剔除 @@debug_only_pods 内所定义的 Pod
|
28
|
+
|
29
|
+
DESC
|
30
|
+
|
31
|
+
def run
|
32
|
+
Pod::Podfile::set_is_release_mode(true)
|
33
|
+
installer_for_config.install!
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -111,7 +111,7 @@ module Pod
|
|
111
111
|
'AlipaySDK.bundle',
|
112
112
|
'AppIcon.appiconset',
|
113
113
|
'KPCameraImages.xcassets',
|
114
|
-
'
|
114
|
+
'UMSocialSDKResources.bundle',
|
115
115
|
'LaunchResource'
|
116
116
|
]
|
117
117
|
except_files = [
|
@@ -168,10 +168,14 @@ module Pod
|
|
168
168
|
|
169
169
|
def run
|
170
170
|
images = analyze(get_source_files, get_images)
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
puts "
|
171
|
+
if images.empty?
|
172
|
+
puts "未找到无效资源"
|
173
|
+
else
|
174
|
+
puts "无效资源文件:"
|
175
|
+
images.each do |img|
|
176
|
+
path = Pathname.new(img.fullpath).relative_path_from(Dir.pwd).to_s
|
177
|
+
puts " #{path}"
|
178
|
+
end
|
175
179
|
end
|
176
180
|
end
|
177
181
|
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -6,7 +6,7 @@ require_relative 'dongjia_pods_iterator'
|
|
6
6
|
require_relative 'dongjia_router'
|
7
7
|
require_relative 'dongjia_scheme_manager'
|
8
8
|
|
9
|
-
require_relative 'helper/
|
9
|
+
require_relative 'helper/podfile'
|
10
10
|
require_relative 'helper/podfile_options'
|
11
11
|
require_relative 'helper/podfile_warnings'
|
12
12
|
|
@@ -8,7 +8,7 @@ module Dongjia
|
|
8
8
|
def self.disable_warnings(config, target_name)
|
9
9
|
# 禁用非 DJ 开头 Pod 的警告
|
10
10
|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = "YES" unless target_name.start_with?('DJ')
|
11
|
-
|
11
|
+
|
12
12
|
# 不检测 block 中的隐式 self 调用
|
13
13
|
config.build_settings['CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF'] = "NO"
|
14
14
|
|
@@ -24,9 +24,9 @@ module Dongjia
|
|
24
24
|
# 不严格的原型校验
|
25
25
|
config.build_settings['CLANG_WARN_STRICT_PROTOTYPES'] = "NO"
|
26
26
|
|
27
|
-
# 强制设置 deployment 版本为
|
28
|
-
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f <
|
29
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "
|
27
|
+
# 强制设置 deployment 版本为 9.0
|
28
|
+
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
|
29
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "9.0"
|
30
30
|
end
|
31
31
|
|
32
32
|
# 关闭 bitcode
|
@@ -50,9 +50,9 @@ module Dongjia
|
|
50
50
|
|
51
51
|
if name != 'Pods.xcodeproj'
|
52
52
|
proj.build_configurations.each do | config |
|
53
|
-
# 强制设置 deployment 版本为
|
54
|
-
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f <
|
55
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "
|
53
|
+
# 强制设置 deployment 版本为 9.0
|
54
|
+
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
|
55
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "9.0"
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require_relative 'pod'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
|
5
|
+
class LocalSpec
|
6
|
+
@@local_spec_importing = false
|
7
|
+
@@local_spec_path = nil
|
8
|
+
def self.import_local_pod(path)
|
9
|
+
@@local_spec_importing = true
|
10
|
+
@@local_spec_path = path
|
11
|
+
yield if block_given?
|
12
|
+
@@local_spec_path = nil
|
13
|
+
@@local_spec_importing = false
|
14
|
+
end
|
15
|
+
def self.local_spec_importing?
|
16
|
+
@@local_spec_importing
|
17
|
+
end
|
18
|
+
def self.local_spec_path
|
19
|
+
@@local_spec_path
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class Podfile
|
24
|
+
|
25
|
+
# 只在 debug 模式下集成的组件,默认为空
|
26
|
+
@@debug_only_pods = []
|
27
|
+
|
28
|
+
# 导入工程目录下相对位置的 pod
|
29
|
+
def import_relative_in(path = './')
|
30
|
+
LocalSpec.import_local_pod(path) do
|
31
|
+
yield if block_given?
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
original_pod = instance_method(:pod)
|
36
|
+
define_method(:pod) do |name = nil, *requirements|
|
37
|
+
|
38
|
+
if Pod::Podfile::is_release_mode?
|
39
|
+
realname = name.split('/').first
|
40
|
+
if @@debug_only_pods.include?(realname)
|
41
|
+
puts "#{realname} is only for debug, it will be removed."
|
42
|
+
next
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
if LocalSpec.local_spec_importing?
|
47
|
+
path_cfg = { :path => "#{LocalSpec.local_spec_path}/#{Pod::repo_name(name)}" }
|
48
|
+
if requirements.length == 0
|
49
|
+
requirements = [path_cfg]
|
50
|
+
else
|
51
|
+
cfg = requirements.first
|
52
|
+
cfg.merge!(path_cfg) unless cfg.has_key?(:path)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
original_pod.bind(self).(name, *requirements)
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiangzhuoyi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/cocoapods-dongjia/command/install.rb
|
80
80
|
- lib/cocoapods-dongjia/command/open.rb
|
81
81
|
- lib/cocoapods-dongjia/command/reinstall.rb
|
82
|
+
- lib/cocoapods-dongjia/command/release.rb
|
82
83
|
- lib/cocoapods-dongjia/command/strip.rb
|
83
84
|
- lib/cocoapods-dongjia/gem_version.rb
|
84
85
|
- lib/cocoapods_plugin.rb
|
@@ -91,7 +92,7 @@ files:
|
|
91
92
|
- lib/dongjia_source.rb
|
92
93
|
- lib/helper/dongjia_version_checker.rb
|
93
94
|
- lib/helper/pod.rb
|
94
|
-
- lib/helper/
|
95
|
+
- lib/helper/podfile.rb
|
95
96
|
- lib/helper/podfile_options.rb
|
96
97
|
- lib/helper/podfile_warnings.rb
|
97
98
|
- lib/helper/project.rb
|
@@ -100,8 +101,8 @@ licenses:
|
|
100
101
|
- MIT
|
101
102
|
metadata:
|
102
103
|
update_desc: |2
|
103
|
-
-
|
104
|
-
-
|
104
|
+
- 兼容 Xcode 12 工程设置
|
105
|
+
- 增加 release 命令
|
105
106
|
post_install_message:
|
106
107
|
rdoc_options: []
|
107
108
|
require_paths:
|
@@ -117,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
118
|
- !ruby/object:Gem::Version
|
118
119
|
version: '0'
|
119
120
|
requirements: []
|
120
|
-
rubygems_version: 3.1.
|
121
|
+
rubygems_version: 3.1.2
|
121
122
|
signing_key:
|
122
123
|
specification_version: 4
|
123
124
|
summary: A longer description of cocoapods-dongjia.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require_relative 'pod'
|
2
|
-
|
3
|
-
module Pod
|
4
|
-
|
5
|
-
class Podfile
|
6
|
-
|
7
|
-
# 导入工程目录下相对位置的 pod
|
8
|
-
@local_spec_importing = false
|
9
|
-
@local_spec_path = nil
|
10
|
-
def import_relative_in(path = './')
|
11
|
-
@local_spec_importing = true
|
12
|
-
@local_spec_path = path
|
13
|
-
yield if block_given?
|
14
|
-
@local_spec_path = nil
|
15
|
-
@local_spec_importing = false
|
16
|
-
end
|
17
|
-
|
18
|
-
original_pod = instance_method(:pod)
|
19
|
-
define_method(:pod) do |name = nil, *requirements|
|
20
|
-
if @local_spec_importing
|
21
|
-
path_cfg = { :path => "#{@local_spec_path}/#{Pod::repo_name(name)}" }
|
22
|
-
if requirements.length == 0
|
23
|
-
requirements = [path_cfg]
|
24
|
-
else
|
25
|
-
cfg = requirements.first
|
26
|
-
cfg.merge!(path_cfg) unless cfg.has_key?(:path)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
original_pod.bind(self).(name, *requirements)
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|