Top Level Namespace
Defined Under Namespace
Modules: CocoapodsFlutter, Pod
Classes: Archiver, CommandRunner, Remote, ZipFileGenerator
Instance Method Summary
collapse
Instance Method Details
#install_debug_flutter_app(url, ref) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/cocoapods-flutter/native/flutterhelper.rb', line 15
def install_debug_flutter_app(url, ref)
puts "Compiling☕️️️️️☕️☕️\n"
flutter_application_path = __dir__ + "/.flutter"
flutter_application_url = ""
flutter_application_branch = 'master'
if url != nil
flutter_application_url = url
if ref != nil
flutter_application_branch = ref
end
else
raise "Error: 请在'Podfile'里增加Flutter App git地址配置,配置格式请查看'flutterhelper.rb'文件"
end
update_flutter_app_debug(flutter_application_path, flutter_application_url, flutter_application_branch)
if $?.to_i == 0
flutter_package_path = "#{flutter_application_path}/.build_ios/product"
install_release_flutter_app_pod(flutter_package_path)
else
raise "Error: 编译 Flutter App失败"
end
end
|
#update_flutter_app_debug(path, url, ref) ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/cocoapods-flutter/native/flutterhelper.rb', line 2
def update_flutter_app_debug(path, url, ref)
if !File.exist?(path)
`git clone #{url} #{path}`
`cd #{path} && git fetch --all -v && \
git reset --hard origin/master && \
git pull && \
git checkout #{ref} && \
cd #{path} && \
sh build_ios.sh -m release`
end
puts "Flutter project is already existed, remove '.flutter' folder and `pod install` again the flutter project will be rebuilded with new code."
end
|