cocoapods-modularization 0.0.5 → 0.0.8
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-modularization/command/install.rb +14 -8
- data/lib/cocoapods-modularization/command/mod/template.rb +1 -1
- data/lib/cocoapods-modularization/gem_version.rb +1 -1
- data/lib/cocoapods-modularization/meta/meta_reference.rb +1 -1
- data/lib/cocoapods_plugin.rb +10 -1
- data/lib/hooks.rb +16 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28c0053bcf866eb1e608b3567e2665b12679b1d8349805658b77883fdc6da9f5
|
4
|
+
data.tar.gz: e1a97d843433bfc31bedace340fb42d29380cd0141ffaeaa122d7c87c6e26f7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c120ee96da859502938d0c8bd0402c64234036085bc855eed4b705776120458f8e1df0315b8d2d6e26c4c76558472f18e6243ecd9f9c4d868b3e7918b95b7cc
|
7
|
+
data.tar.gz: 4a1d95d8ea73a0e87bf5ad34e8c599bdd9501116bfbb73da2a17747ba451c40900a34fea7db12e1d6277653075ace79038d9d6fc33a81a995bfc3394461a3002
|
@@ -37,6 +37,7 @@ module Pod
|
|
37
37
|
['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only ' \
|
38
38
|
'applies to projects that have enabled incremental installation'],
|
39
39
|
['--enable-branch', 'Enable branch dependency'],
|
40
|
+
['--original', 'Run pod install ignore cocoapods-modularization']
|
40
41
|
].concat(super).reject { |(name, _)| name == '--no-repo-update' }
|
41
42
|
end
|
42
43
|
|
@@ -45,14 +46,17 @@ module Pod
|
|
45
46
|
@deployment = argv.flag?('deployment', false)
|
46
47
|
@clean_install = argv.flag?('clean-install', false)
|
47
48
|
@enable_branch = argv.flag?('enable-branch', false)
|
49
|
+
@original = argv.flag?('original', false)
|
48
50
|
end
|
49
51
|
|
50
52
|
def run
|
51
53
|
# encode podfile
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
54
|
+
unless @original
|
55
|
+
begin
|
56
|
+
Meta::MetaReference.encode_podfile(@enable_branch)
|
57
|
+
rescue Exception => e
|
58
|
+
UI.puts "pod install error: #{e}"
|
59
|
+
end
|
56
60
|
end
|
57
61
|
|
58
62
|
# install
|
@@ -64,10 +68,12 @@ module Pod
|
|
64
68
|
installer.clean_install = @clean_install
|
65
69
|
installer.install!
|
66
70
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
+
unless @original
|
72
|
+
begin
|
73
|
+
add_modularization_into_xcode_reference
|
74
|
+
rescue Exception => e
|
75
|
+
UI.puts e
|
76
|
+
end
|
71
77
|
end
|
72
78
|
end
|
73
79
|
|
@@ -24,7 +24,7 @@ module Pod
|
|
24
24
|
if File.exist?(build_path)
|
25
25
|
FileUtils.rm_rf(build_path)
|
26
26
|
end
|
27
|
-
|
27
|
+
`git clone http://gitlab.appshahe.com/ios-specs/template.git .build`
|
28
28
|
|
29
29
|
unless File.exist?("#{Dir.pwd}/.build")
|
30
30
|
puts "./.build not found"
|
@@ -120,7 +120,7 @@ module Pod
|
|
120
120
|
def try_source(e, dependency_data)
|
121
121
|
binary = dependency_data[MetaConstants.binary_key]
|
122
122
|
source_url = dependency_data[MetaConstants.source_key]
|
123
|
-
|
123
|
+
|
124
124
|
if binary && source_url == Private::PrivateCache.source_repo_url
|
125
125
|
source_url = Private::PrivateCache.binary_repo_url
|
126
126
|
else
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -1 +1,10 @@
|
|
1
|
-
require 'cocoapods-
|
1
|
+
require 'cocoapods-core'
|
2
|
+
require_relative 'hooks.rb'
|
3
|
+
|
4
|
+
module Pod
|
5
|
+
module CocoapodsModularization
|
6
|
+
Pod::HooksManager.register('cocoapods-modularization', :post_install) do |context|
|
7
|
+
Hooks.new.hook_post_install(context)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/hooks.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'cocoapods'
|
2
|
+
require 'cocoapods-modularization/command'
|
3
|
+
|
4
|
+
module Pod
|
5
|
+
module CocoapodsModularization
|
6
|
+
class Hooks
|
7
|
+
require 'xcodeproj'
|
8
|
+
|
9
|
+
def hook_post_install(context)
|
10
|
+
Dir.glob("#{Meta::MetaConstants.post_install_hooks_path}/**/*.rb").each do |script|
|
11
|
+
system("/usr/bin/ruby #{script}")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-modularization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lazy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/cocoapods-modularization/private.rb
|
87
87
|
- lib/cocoapods-modularization/private/private_cache.rb
|
88
88
|
- lib/cocoapods_plugin.rb
|
89
|
+
- lib/hooks.rb
|
89
90
|
homepage: https://github.com/EXAMPLE/cocoapods-modularization
|
90
91
|
licenses:
|
91
92
|
- MIT
|