cocoapods-fast-install 0.0.2 → 0.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2232041ed66599aa0556cda08a0c5a70472df816
|
4
|
+
data.tar.gz: beb9e2c515849feafd26f3561bff8834ba63e62d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6e016c1c275d0e7391e182f212bbd80885fc0c35545bde2f777b0dc44b4acb14ae3ab00d552855d4e093d8ccd3ad09dfed61c91736e76f9c8fe7aba267bf74b
|
7
|
+
data.tar.gz: fec63c3b9dc5194119e318547126fb099dd3a19383351bee209c5742f4ce75244aa1c35c3468f90fd8a7c46799844b782abf38c0a2c233c72effa7b791a06169
|
data/README.md
CHANGED
@@ -18,17 +18,22 @@ Umbrella Header and Module are compatible with this plugin.
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
$ pod install-ci
|
22
|
+
|
23
|
+
or
|
24
|
+
|
25
|
+
Add the flowing in the Podfile, and do `pod install`
|
22
26
|
|
23
27
|
```ruby
|
24
|
-
|
25
|
-
|
28
|
+
if ENV["A_FLAG_TO_INDICATE_CI"] # wrap it with a environment variable, so it's only enabled on the CI.
|
29
|
+
plugin 'cocoapods-fast-install'
|
30
|
+
accelerate_xcproject_generating!
|
31
|
+
end
|
26
32
|
```
|
27
33
|
|
28
34
|
If you want keep headers for some pods
|
29
35
|
|
30
36
|
```ruby
|
31
|
-
plugin 'cocoapods-fast-install'
|
32
37
|
accelerate_xcproject_generating! :keeping_header_for => ['Protobuf', 'AFNetworking']
|
33
38
|
```
|
34
39
|
|
@@ -9,6 +9,9 @@ module Pod
|
|
9
9
|
attr_accessor :excluded_target_names # Array<String>
|
10
10
|
end
|
11
11
|
|
12
|
+
self.user_excluded_targets = []
|
13
|
+
self.excluded_target_names = []
|
14
|
+
|
12
15
|
def self.should_skip_path(absolute_path)
|
13
16
|
# may not support 'one pod for multiple platform'
|
14
17
|
self.excluded_target_names.all? { |name| not (absolute_path.to_s.include? '/'+name+'/') }
|
@@ -57,7 +60,7 @@ module Pod
|
|
57
60
|
# find the pod that cannot support
|
58
61
|
relative_importing_target_names = []
|
59
62
|
cpp_target_names = []
|
60
|
-
|
63
|
+
|
61
64
|
pod_targets.map do |target|
|
62
65
|
if target.uses_cpp?
|
63
66
|
cpp_target_names << target.name
|
@@ -80,8 +83,6 @@ $c = 0
|
|
80
83
|
puts "Skip excluding headers (contain relative importing): #{relative_importing_target_names}" unless relative_importing_target_names.empty?
|
81
84
|
end
|
82
85
|
|
83
|
-
puts "cdddddd #{$c}"
|
84
|
-
exit
|
85
86
|
end
|
86
87
|
|
87
88
|
end
|
@@ -117,7 +118,6 @@ $c = 0
|
|
117
118
|
# 但 hook 这个函数更方便
|
118
119
|
FAST_INSTALL_OLD_project_file_references_array = instance_method :project_file_references_array
|
119
120
|
define_method(:project_file_references_array) do |files, file_type|
|
120
|
-
$c += files.count
|
121
121
|
|
122
122
|
if file_type == 'header'
|
123
123
|
files = files.reject do |path|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
# This is an example of a cocoapods plugin adding a top-level subcommand
|
4
|
+
# to the 'pod' command.
|
5
|
+
#
|
6
|
+
# You can also create subcommands of existing or new commands. Say you
|
7
|
+
# wanted to add a subcommand to `list` to show newly deprecated pods,
|
8
|
+
# (e.g. `pod list deprecated`), there are a few things that would need
|
9
|
+
# to change.
|
10
|
+
#
|
11
|
+
# - move this file to `lib/pod/command/list/deprecated.rb` and update
|
12
|
+
# the class to exist in the the Pod::Command::List namespace
|
13
|
+
# - change this class to extend from `List` instead of `Command`. This
|
14
|
+
# tells the plugin system that it is a subcommand of `list`.
|
15
|
+
# - edit `lib/cocoapods_plugins.rb` to require this file
|
16
|
+
#
|
17
|
+
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
18
|
+
# in the `plugins.json` file, once your plugin is released.
|
19
|
+
#
|
20
|
+
class InstallCI < Command
|
21
|
+
self.summary = 'Pod install, but have special optimizing for CI to speed up the install process.'
|
22
|
+
|
23
|
+
self.description = <<-DESC
|
24
|
+
Pod install, but have special optimizing for CI to speed up the install process.
|
25
|
+
It will exclude the header files in the xcode project.
|
26
|
+
DESC
|
27
|
+
|
28
|
+
|
29
|
+
def initialize(argv)
|
30
|
+
super
|
31
|
+
@install_command = Command::Install.new(argv)
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
def run
|
36
|
+
require 'cocoapods-fast-install/Patch'
|
37
|
+
require 'cocoapods-fast-install/validate_patch'
|
38
|
+
@install_command.run
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -7,7 +7,6 @@ module Pod
|
|
7
7
|
require 'cocoapods-fast-install/Patch'
|
8
8
|
require 'cocoapods-fast-install/validate_patch'
|
9
9
|
|
10
|
-
FastProjectGenerating.user_excluded_targets = []
|
11
10
|
skipped = parameters[:keeping_header_for]
|
12
11
|
if skipped.kind_of? String
|
13
12
|
FastProjectGenerating.user_excluded_targets << skipped
|
@@ -20,4 +19,8 @@ module Pod
|
|
20
19
|
end
|
21
20
|
end
|
22
21
|
|
23
|
-
|
22
|
+
Pod::HooksManager.register('cocoapods-fast-install', :pre_install) do |installer_context|
|
23
|
+
require 'cocoapods-fast-install/print_duration'
|
24
|
+
end
|
25
|
+
|
26
|
+
|
data/lib/cocoapods_plugin.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-fast-install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gao
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- cocoapods-fast-install.gemspec
|
54
54
|
- lib/cocoapods-fast-install.rb
|
55
55
|
- lib/cocoapods-fast-install/Patch.rb
|
56
|
+
- lib/cocoapods-fast-install/command.rb
|
56
57
|
- lib/cocoapods-fast-install/gem_version.rb
|
57
58
|
- lib/cocoapods-fast-install/main.rb
|
58
59
|
- lib/cocoapods-fast-install/print_duration.rb
|