cocoapods-binary 0.3.3 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +11 -8
- data/cocoapods-binary.gemspec +4 -4
- data/lib/cocoapods-binary/Integration.rb +3 -1
- data/lib/cocoapods-binary/Prebuild.rb +11 -2
- data/lib/cocoapods-binary/gem_version.rb +1 -1
- data/lib/cocoapods-binary/helper/passer.rb +10 -0
- data/lib/cocoapods-binary/helper/prebuild_sandbox.rb +7 -0
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842186243feeeb7dfda5f70452285d734e53c1234a3ae2e8fdeeee41be7be704
|
4
|
+
data.tar.gz: 1806fd357f218b5a33c0091f2db774c18c058f35ea90de93f38a89d22bfd6fb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47e590edd78430eb617ef69609ac977aaef0d791c96fd742a263f3067b34755a6d02ac89ab759e5f9ff62732364f0e4bf51129cfa6d90973f363c66fd5fd0c97
|
7
|
+
data.tar.gz: d7755675d2b5c4eae53722a2732427584d80b2bed2a89241913a71bec174e9677e6b8ed86c88cca8e8db328abd8a66516fd7567cd9aa37235c26d5baee8c86c1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ A CocoaPods plugin to integrate pods in form of prebuilt frameworks, not source
|
|
6
6
|
|
7
7
|
## Why
|
8
8
|
|
9
|
-
You may wonder why CocoaPods doesn't have a function to integrate libs in form of binaries, if there are dozens or hundreds of pods your podfile and compile them for a great many times meaninglessly. Too many source code of libs slow down your compile and the response of IDE (e.g. code completion), and then reduce work efficiency, leaving us time to think about the meaning of life.
|
9
|
+
You may wonder why CocoaPods doesn't have a function to integrate libs in form of binaries, if there are dozens or hundreds of pods in your podfile and compile them for a great many times meaninglessly. Too many source code of libs slow down your compile and the response of IDE (e.g. code completion), and then reduce work efficiency, leaving us time to think about the meaning of life.
|
10
10
|
|
11
11
|
This plugin implements this simple wish. Replace the source code in pod target with prebuilt frameworks.
|
12
12
|
|
@@ -46,18 +46,21 @@ end
|
|
46
46
|
```
|
47
47
|
|
48
48
|
- Add `plugin 'cocoapods-binary'` in the head of Podfile
|
49
|
-
-
|
50
|
-
|
51
|
-
- Or add `all_binary!` before all targets. This makes all pods binaries.
|
52
|
-
|
53
|
-
if you want to disable binary for a specific pod when using `all_binary!`, place a `:binary => false` to it.
|
49
|
+
- Add `:binary => true` as a option of one specific pod, or add `all_binary!` before all targets, which makes all pods binaries.
|
50
|
+
- pod install, and that's all
|
54
51
|
|
55
52
|
**Note**: cocoapods-binary require `use_frameworks!`. If your worry about the boot time and other problems introduced by dynamic framework, static framework is a good choice. Another [plugin](https://github.com/leavez/cocoapods-static-swift-framework) made by me to make all pods static frameworks is recommended.
|
56
53
|
|
57
|
-
####
|
54
|
+
#### Options
|
55
|
+
|
56
|
+
If you want to disable binary for a specific pod when using `all_binary!`, place a `:binary => false` to it.
|
57
|
+
|
58
|
+
If bitcode is needed, add a `enable_bitcode_for_prebuilt_frameworks!` before all targets in Podfile
|
59
|
+
|
60
|
+
#### Known Issues
|
58
61
|
|
59
62
|
- doesn't support watchos now
|
60
|
-
- dSYM files is missing for dynamic frameworks using this plugin
|
63
|
+
- dSYM files is missing for dynamic frameworks using this plugin. Walkaround: Don't use this plugin for a release build. Add a if condition with ENV around `plugin 'cocoapods-binary'`
|
61
64
|
|
62
65
|
## License
|
63
66
|
|
data/cocoapods-binary.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = CocoapodsBinary::VERSION
|
9
9
|
spec.authors = ['leavez']
|
10
10
|
spec.email = ['gaojiji@gmail.com']
|
11
|
-
spec.description = %q{
|
12
|
-
spec.summary = %q{A
|
13
|
-
spec.homepage = 'https://github.com/
|
11
|
+
spec.description = %q{integrate pods in form of prebuilt frameworks conveniently, reducing compile time}
|
12
|
+
spec.summary = %q{A CocoaPods plugin to integrate pods in form of prebuilt frameworks, not source code, by adding just one flag in podfile. Speed up compiling dramatically.}
|
13
|
+
spec.homepage = 'https://github.com/leavez/cocoapods-binary'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/).reject{|f| f.start_with? "test/"}
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency "cocoapods", ">= 1.
|
21
|
+
spec.add_dependency "cocoapods", ">= 1.5.0", "< 2.0"
|
22
22
|
spec.add_dependency "fourflusher", "~> 2.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
@@ -154,9 +154,11 @@ module Pod
|
|
154
154
|
prebuilt_specs.each do |spec|
|
155
155
|
# `spec` may be a subspec, so we use the root's name
|
156
156
|
root_name = spec.root.name
|
157
|
+
|
158
|
+
target = name_to_target_hash[root_name]
|
159
|
+
next if Prebuild::Passer.target_names_to_skip_integration_framework.include? target.pod_name
|
157
160
|
|
158
161
|
# use the prebuilt framework
|
159
|
-
target = name_to_target_hash[root_name]
|
160
162
|
original_vendored_frameworks = spec.attributes_hash["vendored_frameworks"] || []
|
161
163
|
if original_vendored_frameworks.kind_of?(String)
|
162
164
|
original_vendored_frameworks = [original_vendored_frameworks]
|
@@ -143,7 +143,6 @@ module Pod
|
|
143
143
|
object.target_file_path = path.gsub('${PODS_ROOT}', standard_sandbox_path.to_s)
|
144
144
|
object
|
145
145
|
end
|
146
|
-
Prebuild::Passer.resources_to_copy_for_static_framework ||= {}
|
147
146
|
Prebuild::Passer.resources_to_copy_for_static_framework[target.name] = path_objects
|
148
147
|
end
|
149
148
|
end
|
@@ -153,6 +152,16 @@ module Pod
|
|
153
152
|
# copy vendored libraries and frameworks
|
154
153
|
targets.each do |target|
|
155
154
|
root_path = self.sandbox.pod_dir(target.name)
|
155
|
+
target_folder = sandbox.framework_folder_path_for_pod_name(target.name)
|
156
|
+
|
157
|
+
# If target shouldn't build, we copy all the original files
|
158
|
+
# This is for target with only .a and .h files
|
159
|
+
if not target.should_build?
|
160
|
+
Prebuild::Passer.target_names_to_skip_integration_framework << target.pod_name
|
161
|
+
FileUtils.cp_r(root_path, target_folder, :remove_destination => true)
|
162
|
+
next
|
163
|
+
end
|
164
|
+
|
156
165
|
target.spec_consumers.each do |consumer|
|
157
166
|
file_accessor = Sandbox::FileAccessor.new(root_path, consumer)
|
158
167
|
lib_paths = file_accessor.vendored_frameworks || []
|
@@ -160,7 +169,7 @@ module Pod
|
|
160
169
|
# @TODO dSYM files
|
161
170
|
lib_paths.each do |lib_path|
|
162
171
|
relative = lib_path.relative_path_from(root_path)
|
163
|
-
destination =
|
172
|
+
destination = target_folder + relative
|
164
173
|
destination.dirname.mkpath unless destination.dirname.exist?
|
165
174
|
FileUtils.cp_r(lib_path, destination, :remove_destination => true)
|
166
175
|
end
|
@@ -26,6 +26,16 @@ module Pod
|
|
26
26
|
#
|
27
27
|
# @return [Hash<String, [Passer::ResourcePath]>]
|
28
28
|
class_attr_accessor :resources_to_copy_for_static_framework
|
29
|
+
self.resources_to_copy_for_static_framework = {}
|
30
|
+
|
31
|
+
# Some pod won't be build in prebuild stage even if it have `binary=>true`.
|
32
|
+
# The targets of this pods have `oshould_build? == true`.
|
33
|
+
# We should skip integration (patch spec) for this pods
|
34
|
+
#
|
35
|
+
# @return [Array<String>]
|
36
|
+
class_attr_accessor :target_names_to_skip_integration_framework
|
37
|
+
self.target_names_to_skip_integration_framework = []
|
38
|
+
|
29
39
|
end
|
30
40
|
end
|
31
41
|
end
|
@@ -38,5 +38,12 @@ module Pod
|
|
38
38
|
end.reject(&:nil?)
|
39
39
|
end
|
40
40
|
|
41
|
+
def framework_existed?(root_name)
|
42
|
+
return false unless generate_framework_path.exist?
|
43
|
+
generate_framework_path.children().any? do |child|
|
44
|
+
child.basename.to_s == root_name
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
41
48
|
end
|
42
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-binary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leavez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.5.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.5.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.0'
|
@@ -72,7 +72,8 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
-
description:
|
75
|
+
description: integrate pods in form of prebuilt frameworks conveniently, reducing
|
76
|
+
compile time
|
76
77
|
email:
|
77
78
|
- gaojiji@gmail.com
|
78
79
|
executables: []
|
@@ -99,7 +100,7 @@ files:
|
|
99
100
|
- lib/cocoapods-binary/tool/tool.rb
|
100
101
|
- lib/cocoapods_plugin.rb
|
101
102
|
- spec/spec_helper.rb
|
102
|
-
homepage: https://github.com/
|
103
|
+
homepage: https://github.com/leavez/cocoapods-binary
|
103
104
|
licenses:
|
104
105
|
- MIT
|
105
106
|
metadata: {}
|
@@ -119,9 +120,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
120
|
version: '0'
|
120
121
|
requirements: []
|
121
122
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.7.
|
123
|
+
rubygems_version: 2.7.6
|
123
124
|
signing_key:
|
124
125
|
specification_version: 4
|
125
|
-
summary: A
|
126
|
+
summary: A CocoaPods plugin to integrate pods in form of prebuilt frameworks, not
|
127
|
+
source code, by adding just one flag in podfile. Speed up compiling dramatically.
|
126
128
|
test_files:
|
127
129
|
- spec/spec_helper.rb
|