cocoapods-flutter-dt 0.0.9 → 0.2.2
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f22344232ec5b246b9410053a456f66e47b988c21360c3c1e1ca10388d7817c
|
|
4
|
+
data.tar.gz: 0baa0cfa75d779b88adff0041c5be749f365320498f9a5288dc986c18a11e4b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 124f274015bcb961a96e69c22d100a75ae0162de07749c4437b25cdd35f35b92d12bfef16794180657b27db8ea6e49b663e45345843e6b6b37e51d3ec850eb89
|
|
7
|
+
data.tar.gz: a0b8232cea3cccb9fce4d04d5da2951c821660db601b8944a27025a7a3d55caf078c0323a2ad4b8bdc407622290cd2e68f0623a32ac1d2c6293776c9606efce7
|
|
@@ -20,7 +20,9 @@ module Pod
|
|
|
20
20
|
['--upgrade', 'pub upgrade'],
|
|
21
21
|
['--wrapper', 'Default is flutter'],
|
|
22
22
|
['--flutterversion', 'FlutterSDK version'],
|
|
23
|
-
['--buildrun', 'run build-runner']
|
|
23
|
+
['--buildrun', 'run build-runner'],
|
|
24
|
+
['--debug', 'debug mode'],
|
|
25
|
+
['--release', 'release mode'],
|
|
24
26
|
].concat(Pod::Command::Repo::Push.options).concat(super).uniq
|
|
25
27
|
end
|
|
26
28
|
|
|
@@ -52,21 +54,49 @@ module Pod
|
|
|
52
54
|
@version = versions.join "."
|
|
53
55
|
end
|
|
54
56
|
|
|
57
|
+
|
|
58
|
+
@build_modes = []
|
|
55
59
|
@pod_repo = argv.option('repo', 'master')
|
|
56
60
|
@sources = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
|
|
57
61
|
@flutter_wrapper = argv.option('wrapper', 'flutter')
|
|
58
62
|
@pub_upgrade = argv.flag?('upgrade', true)
|
|
59
|
-
@flutter_version = argv.option('flutterversion',
|
|
63
|
+
@flutter_version = argv.option('flutterversion', default_fluttter_version)
|
|
60
64
|
@build_run = argv.flag?('buildrun', true)
|
|
61
65
|
@working_dir = Dir.pwd
|
|
66
|
+
|
|
67
|
+
if argv.flag?('debug', true)
|
|
68
|
+
@build_modes.append 'debug'
|
|
69
|
+
end
|
|
70
|
+
if argv.flag?('release', true)
|
|
71
|
+
@build_modes.append 'release'
|
|
72
|
+
end
|
|
73
|
+
|
|
62
74
|
super
|
|
63
75
|
end
|
|
64
76
|
|
|
65
77
|
def run
|
|
66
|
-
archiver = Archiver.new(@module_name, @version, @sources, @flutter_wrapper, @pub_upgrade, @flutter_version, @build_run, @working_dir,@pod_repo)
|
|
78
|
+
archiver = Archiver.new(@module_name, @version, @sources, @flutter_wrapper, @pub_upgrade, @flutter_version, @build_run, @working_dir,@pod_repo, @build_modes)
|
|
67
79
|
archiver.archive
|
|
68
80
|
end
|
|
69
81
|
|
|
82
|
+
def default_fluttter_version
|
|
83
|
+
flutter_version = ''
|
|
84
|
+
stdin, stdout_stderr, wait_thr = Open3.popen2e(@flutter_wrapper, '--version');
|
|
85
|
+
stdout_stderr.each_line do |line|
|
|
86
|
+
if line.start_with?('Flutter ')
|
|
87
|
+
flutter_version = line.split(' • ').first.split(' ').last
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
exit_status = wait_thr.value
|
|
91
|
+
if exit_status.success?
|
|
92
|
+
puts stdout_stderr.gets
|
|
93
|
+
else
|
|
94
|
+
raise stdout_stderr.gets
|
|
95
|
+
end
|
|
96
|
+
stdout_stderr.close
|
|
97
|
+
stdin.close
|
|
98
|
+
flutter_version
|
|
99
|
+
end
|
|
70
100
|
end
|
|
71
101
|
end
|
|
72
102
|
end
|
|
@@ -32,7 +32,7 @@ class Archiver
|
|
|
32
32
|
|
|
33
33
|
public
|
|
34
34
|
|
|
35
|
-
def initialize(module_name, version, sources, flutter_wrapper, pub_upgrade, flutter_version, build_run, working_dir, repo)
|
|
35
|
+
def initialize(module_name, version, sources, flutter_wrapper, pub_upgrade, flutter_version, build_run, working_dir, repo, build_modes)
|
|
36
36
|
@module_name = module_name
|
|
37
37
|
@version = version
|
|
38
38
|
@sources = sources
|
|
@@ -43,6 +43,7 @@ class Archiver
|
|
|
43
43
|
@working_dir = working_dir
|
|
44
44
|
@product_dir = "#{@working_dir}/.product/"
|
|
45
45
|
@pod_repo = repo
|
|
46
|
+
@build_modes = build_modes
|
|
46
47
|
end
|
|
47
48
|
|
|
48
49
|
def archive
|
|
@@ -59,8 +60,15 @@ class Archiver
|
|
|
59
60
|
end
|
|
60
61
|
build_framework
|
|
61
62
|
@plugins = fetch_plugins
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
if @build_modes.include?('debug')
|
|
65
|
+
debug
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if @build_modes.include?('release')
|
|
69
|
+
release
|
|
70
|
+
end
|
|
71
|
+
|
|
64
72
|
Pod::UserInterface.message "All is ready to use!, now you can use 'flutter_pod '#{@module_name}', '#{@version}', :mode=>'debug/release' to use the pod"
|
|
65
73
|
end
|
|
66
74
|
|
|
@@ -193,9 +201,27 @@ class Archiver
|
|
|
193
201
|
end
|
|
194
202
|
|
|
195
203
|
def build_framework
|
|
196
|
-
|
|
204
|
+
|
|
205
|
+
commands = [
|
|
206
|
+
@flutter_wrapper,
|
|
207
|
+
'build',
|
|
208
|
+
'ios-framework',
|
|
209
|
+
'--no-universal',
|
|
210
|
+
"--output=#{@product_dir}",
|
|
211
|
+
'--no-profile'
|
|
212
|
+
]
|
|
213
|
+
|
|
214
|
+
if @build_modes.include?('debug') == false
|
|
215
|
+
commands.append '--no-debug'
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if @build_modes.include?('release') == false
|
|
219
|
+
commands.append '--no-release'
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if CommandRunner.run(*commands) == false
|
|
197
223
|
# FileUtils.remove_dir product_dir, true
|
|
198
|
-
raise "Error running #{
|
|
224
|
+
raise "Error running #{commands.join ' '} "
|
|
199
225
|
end
|
|
200
226
|
end
|
|
201
227
|
|
|
@@ -366,10 +392,10 @@ end
|
|
|
366
392
|
s.license = { :type => 'BSD' }
|
|
367
393
|
s.author = { 'Dreamtracer' => 'http://dreamtracer.top' }
|
|
368
394
|
s.source = { :http => app_download_url }
|
|
369
|
-
s.ios.deployment_target = '
|
|
395
|
+
s.ios.deployment_target = '10.0'
|
|
370
396
|
s.prepare_command = "ruby download_sdk.rb #{sdk_download_url}"
|
|
371
|
-
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
372
|
-
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
397
|
+
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 x86_64' }
|
|
398
|
+
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 x86_64' }
|
|
373
399
|
vendored_frameworks = ["App.framework", "Flutter.framework", "FlutterPluginRegistrant.framework"]
|
|
374
400
|
@plugins.each do |plugin|
|
|
375
401
|
vendored_frameworks.append "#{plugin.name}.framework"
|
|
@@ -389,6 +415,7 @@ end
|
|
|
389
415
|
|
|
390
416
|
Dir.chdir temp_dir do |dir|
|
|
391
417
|
Pod::Command::Repo::Push.run([@pod_repo, '--skip-import-validation', '--verbose', '--allow-warnings', "--sources=#{@sources.join(',')}"])
|
|
418
|
+
File.delete spec_file
|
|
392
419
|
end
|
|
393
420
|
|
|
394
421
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocoapods-flutter-dt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- "\bDreamtracer"
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: parallel
|