cocoapods-packager-ext 0.0.37 → 0.0.45
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/cocoapods-packager-ext.gemspec +10 -3
- data/lib/cocoapods-packager-ext/command/package_ext.rb +89 -1
- data/lib/cocoapods-packager-ext/ext/builder.rb +4 -2
- data/lib/cocoapods-packager-ext/ext/pod_utils.rb +1 -0
- data/lib/cocoapods-packager-ext/gem_version.rb +1 -1
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85efa34fb9a5d7585a4a5c7e6938c6033760f42a1b6cc5ca8211782634ffab4a
|
4
|
+
data.tar.gz: 554e224b42a2392d2a36763878b36d0141f49bfeb277cbed6e9aa881b8b66cbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d846c8d3911e7f595a98dcbe2a533f5fb598af083aa962f2a47aa67cb1f00cfe514cafc8a936990715312dbded1d7d8368937f22910943b3301a038abcb8bee1
|
7
|
+
data.tar.gz: b4b4e4050586f02d834b3e23b282a91874286e2656d280b9ab3bbc5ad60a8af412dedfd04b4143c10dcb664301741f7b1bbeea342c5c8bb25ede0f6d0091d87f
|
@@ -8,8 +8,15 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = CocoapodsPackagerExt::VERSION
|
9
9
|
spec.authors = ['kyle.zhou']
|
10
10
|
spec.email = ['kyle.zhou@qq.com']
|
11
|
-
spec.description = %q{
|
12
|
-
spec.summary = %q{
|
11
|
+
spec.description = %q{cocoapods-packager extension.}
|
12
|
+
spec.summary = %q{
|
13
|
+
--Podfile: supports analyze version dependencies from a Podfile
|
14
|
+
--Archs: supports specified arch
|
15
|
+
--exclude-deps: excludes the specified dependent libraries
|
16
|
+
--Update: Update sources are supported
|
17
|
+
ENV[ENABLE_BACKUP_WORKSPACE] == YES: The compile workspace will be saved
|
18
|
+
ENV['ENABLE_CLEAN_DUMMY_FILE'] == YES: clean all dymmy file, avoid dymmy symbols being defined repeatedly.
|
19
|
+
}
|
13
20
|
spec.homepage = 'https://github.com/EXAMPLE/cocoapods-packager-ext'
|
14
21
|
spec.license = 'MIT'
|
15
22
|
|
@@ -20,6 +27,6 @@ Gem::Specification.new do |spec|
|
|
20
27
|
|
21
28
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
29
|
spec.add_development_dependency 'rake'
|
23
|
-
spec.add_runtime_dependency(%q<cocoapods-packager>.freeze,["1.5.
|
30
|
+
spec.add_runtime_dependency(%q<cocoapods-packager-clone-master>.freeze,["1.5.2"])
|
24
31
|
|
25
32
|
end
|
@@ -31,6 +31,7 @@ module Pod
|
|
31
31
|
o.push(['--archs','select archs'])
|
32
32
|
o.push(['--podfile','select deps version from podfile'])
|
33
33
|
o.push(['--platform','select platform'])
|
34
|
+
o.push(['--update','update all source'])
|
34
35
|
o.concat(super)
|
35
36
|
end
|
36
37
|
rescue
|
@@ -44,8 +45,9 @@ module Pod
|
|
44
45
|
def initialize(argv)
|
45
46
|
@exclude_dep_items = argv.option('exclude-deps','').split(',')
|
46
47
|
@select_archs = argv.option('archs','').split(',')
|
47
|
-
@podfile = argv.option('podfile'
|
48
|
+
@podfile = argv.option('podfile' )
|
48
49
|
@platform = argv.option('platform','')
|
50
|
+
@update = argv.flag?('update',false )
|
49
51
|
initialize_t argv
|
50
52
|
end
|
51
53
|
|
@@ -190,6 +192,92 @@ RB
|
|
190
192
|
end
|
191
193
|
end
|
192
194
|
|
195
|
+
def pre_podfile(path,sandbox)
|
196
|
+
path = Pathname.new(path)
|
197
|
+
unless path.exist?
|
198
|
+
raise Informative, "No Podfile exists at path `#{path}`."
|
199
|
+
end
|
200
|
+
|
201
|
+
retpath = sandbox.root.to_s+'/podfile'
|
202
|
+
contents = ''
|
203
|
+
File.foreach(path) do |line|
|
204
|
+
contents += line unless line.include? '<!SKIP_PATCH_LINE>'
|
205
|
+
end
|
206
|
+
File.write(retpath,contents)
|
207
|
+
retpath
|
208
|
+
end
|
209
|
+
|
210
|
+
def podfile_from_spec_sandbox(path, spec_name, platform_name, deployment_target, subspecs, sources,sandbox)
|
211
|
+
options = {}
|
212
|
+
if path
|
213
|
+
if @local
|
214
|
+
options[:path] = path
|
215
|
+
else
|
216
|
+
options[:podspec] = path
|
217
|
+
end
|
218
|
+
end
|
219
|
+
options[:subspecs] = subspecs if subspecs
|
220
|
+
podfile_path = pre_podfile @podfile,sandbox
|
221
|
+
podfile = Pod::Podfile.from_file(podfile_path)
|
222
|
+
sources.each { |s| podfile.source s }
|
223
|
+
# podfile.platform(platform_name, deployment_target)
|
224
|
+
podfile.pod(spec_name, options)
|
225
|
+
podfile.install!('cocoapods',
|
226
|
+
:integrate_targets => false,
|
227
|
+
:deterministic_uuids => false)
|
228
|
+
podfile.target('packager') do
|
229
|
+
podfile.inherit! :complete
|
230
|
+
end
|
231
|
+
podfile
|
232
|
+
end
|
233
|
+
|
234
|
+
alias install_pod_t install_pod
|
235
|
+
def install_pod(platform_name, sandbox)
|
236
|
+
if !@podfile && !@update
|
237
|
+
install_pod_t platform_name,sandbox
|
238
|
+
else
|
239
|
+
if not @podfile
|
240
|
+
podfile = podfile_from_spec(
|
241
|
+
@path,
|
242
|
+
@spec.name,
|
243
|
+
platform_name,
|
244
|
+
@spec.deployment_target(platform_name),
|
245
|
+
@subspecs,
|
246
|
+
@spec_sources
|
247
|
+
)
|
248
|
+
else
|
249
|
+
podfile = podfile_from_spec_sandbox(
|
250
|
+
@path,
|
251
|
+
@spec.name,
|
252
|
+
platform_name,
|
253
|
+
@spec.deployment_target(platform_name),
|
254
|
+
@subspecs,
|
255
|
+
@spec_sources,
|
256
|
+
sandbox
|
257
|
+
)
|
258
|
+
end
|
259
|
+
|
260
|
+
static_installer = Installer.new(sandbox, podfile)
|
261
|
+
if @update
|
262
|
+
static_installer.repo_update = true
|
263
|
+
end
|
264
|
+
static_installer.install!
|
265
|
+
|
266
|
+
unless static_installer.nil?
|
267
|
+
static_installer.pods_project.targets.each do |target|
|
268
|
+
target.build_configurations.each do |config|
|
269
|
+
config.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
|
270
|
+
config.build_settings['GCC_GENERATE_DEBUGGING_SYMBOLS'] = 'NO'
|
271
|
+
end
|
272
|
+
end
|
273
|
+
static_installer.pods_project.save
|
274
|
+
end
|
275
|
+
|
276
|
+
static_installer
|
277
|
+
end
|
278
|
+
|
279
|
+
end
|
280
|
+
|
193
281
|
end
|
194
282
|
end
|
195
283
|
end
|
@@ -91,10 +91,11 @@ module Pod
|
|
91
91
|
|
92
92
|
alias compile_t compile
|
93
93
|
def compile
|
94
|
-
defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name}'"
|
95
94
|
if ENV['GCC_PREPROCESSOR_DEFINITIONS']
|
96
|
-
defines
|
95
|
+
defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name} #{ENV['GCC_PREPROCESSOR_DEFINITIONS']}'"
|
97
96
|
UI.puts "Set GCC_PREPROCESSOR_DEFINITIONS:#{defines}"
|
97
|
+
else
|
98
|
+
defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name}'"
|
98
99
|
end
|
99
100
|
defines << ' ' << @spec.consumer(@platform).compiler_flags.join(' ')
|
100
101
|
|
@@ -263,6 +264,7 @@ MAP
|
|
263
264
|
end
|
264
265
|
|
265
266
|
command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{config} -target #{target} -project #{project_root}/Pods.xcodeproj 2>&1"
|
267
|
+
UI.puts "exec command: #{command}"
|
266
268
|
output = `#{command}`.lines.to_a
|
267
269
|
|
268
270
|
if $?.exitstatus != 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-packager-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kyle.zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -39,20 +39,20 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: cocoapods-packager
|
42
|
+
name: cocoapods-packager-clone-master
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.5.
|
47
|
+
version: 1.5.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.5.
|
55
|
-
description:
|
54
|
+
version: 1.5.2
|
55
|
+
description: cocoapods-packager extension.
|
56
56
|
email:
|
57
57
|
- kyle.zhou@qq.com
|
58
58
|
executables: []
|
@@ -100,7 +100,11 @@ requirements: []
|
|
100
100
|
rubygems_version: 3.0.8
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
|
-
summary:
|
103
|
+
summary: "--Podfile: supports analyze version dependencies from a Podfile --Archs:
|
104
|
+
supports specified arch --exclude-deps: excludes the specified dependent libraries
|
105
|
+
--Update: Update sources are supported ENV[ENABLE_BACKUP_WORKSPACE] == YES: The
|
106
|
+
compile workspace will be saved ENV['ENABLE_CLEAN_DUMMY_FILE'] == YES: clean all
|
107
|
+
dymmy file, avoid dymmy symbols being defined repeatedly."
|
104
108
|
test_files:
|
105
109
|
- spec/command/ext_spec.rb
|
106
110
|
- spec/spec_helper.rb
|