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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f3ca295ef8ca0f206daca84dd83b7aa29364789dccb0e0fe70b13e36f6fa545
4
- data.tar.gz: 39bc2744054bc2b240f983510b961dc472f7f065011733dc18d45dd98245d5a5
3
+ metadata.gz: 842186243feeeb7dfda5f70452285d734e53c1234a3ae2e8fdeeee41be7be704
4
+ data.tar.gz: 1806fd357f218b5a33c0091f2db774c18c058f35ea90de93f38a89d22bfd6fb2
5
5
  SHA512:
6
- metadata.gz: 7a6a94e57f3c4b5b5a4419902cb828b0080ef67b57a250f80903a198d4a4ca0c763f95809b9acb47c4be6995c9a3fe4689327797f7449bd529d41e4b46450d0e
7
- data.tar.gz: 5e4b01a22a7a08bbf74dc5c3daeb95c269c796a1c713fc5976eff5f4c8ad4d521d9e93f5dbb4d0953e7a9768986e83ac7a4d7fac356d70d16da41433cb21c6ee
6
+ metadata.gz: 47e590edd78430eb617ef69609ac977aaef0d791c96fd742a263f3067b34755a6d02ac89ab759e5f9ff62732364f0e4bf51129cfa6d90973f363c66fd5fd0c97
7
+ data.tar.gz: d7755675d2b5c4eae53722a2732427584d80b2bed2a89241913a71bec174e9677e6b8ed86c88cca8e8db328abd8a66516fd7567cd9aa37235c26d5baee8c86c1
data/.travis.yml CHANGED
@@ -9,6 +9,7 @@ script:
9
9
  - rake install
10
10
  - cd test
11
11
  - sh test.sh
12
+ - cd ..
12
13
 
13
14
  # auto deploy on tagging
14
15
  # automatically set by `travis setup rubygems`
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
- - 2 ways:
50
- - Add `:binary => true` as a option of one specific pod.
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
- #### Known Issue
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
 
@@ -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{A short description of cocoapods-binary.}
12
- spec.summary = %q{A longer description of cocoapods-binary.}
13
- spec.homepage = 'https://github.com/EXAMPLE/cocoapods-binary'
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.4.0", "< 2.0"
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 = sandbox.framework_folder_path_for_pod_name(target.name) + relative
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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBinary
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.6"
3
3
  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.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-02 00:00:00.000000000 Z
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.4.0
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.4.0
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: A short description of cocoapods-binary.
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/EXAMPLE/cocoapods-binary
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.4
123
+ rubygems_version: 2.7.6
123
124
  signing_key:
124
125
  specification_version: 4
125
- summary: A longer description of cocoapods-binary.
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