Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1bcaa150
Unverified
Commit
1bcaa150
authored
Jul 31, 2019
by
Jenn Magder
Committed by
GitHub
Jul 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make podhelper.rb a template to avoid passing in the module name (#37276)
parent
e77237d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
Podfile
dev/integration_tests/ios_add2app/Podfile
+1
-1
podhelper.rb.tmpl
...mplates/module/ios/library/Flutter.tmpl/podhelper.rb.tmpl
+5
-7
No files found.
dev/integration_tests/ios_add2app/Podfile
View file @
1bcaa150
...
...
@@ -5,7 +5,7 @@ flutter_application_path = 'flutterapp/'
load
File
.
join
(
flutter_application_path
,
'.ios'
,
'Flutter'
,
'podhelper.rb'
)
target
'ios_add2app'
do
install_all_flutter_pods
(
flutter_application_path
,
'ios_add2app_flutter'
)
install_all_flutter_pods
(
flutter_application_path
)
end
target
'ios_add2appTests'
do
...
...
packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb
→
packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb
.tmpl
View file @
1bcaa150
...
...
@@ -8,13 +8,11 @@
# @param [String] flutter_application_path Path of the root directory of the Flutter module.
# Optional, defaults to two levels up from the directory of this script.
# MyApp/my_flutter/.ios/Flutter/../..
# @param [String] flutter_application_name Name of the Flutter module. Optional, defaults to module directory name.
def
install_all_flutter_pods
(
flutter_application_path
=
nil
,
flutter_application_name
=
nil
)
flutter_application_name
||=
File
.
basename
(
File
.
expand_path
(
flutter_application_path
))
def install_all_flutter_pods(flutter_application_path = nil)
flutter_application_path ||= File.join('..', '..')
install_flutter_engine_pod
install_flutter_plugin_pods(flutter_application_path)
install_flutter_application_pod
(
flutter_application_path
,
flutter_application_name
)
install_flutter_application_pod(flutter_application_path)
end
# Install Flutter engine pod.
...
...
@@ -65,12 +63,12 @@ end
#
# @example
# target 'MyApp' do
# install_flutter_application_pod '../flutter_settings_repository'
, 'settings_module'
# install_flutter_application_pod '../flutter_settings_repository'
# end
# @param [String] flutter_application_path Path of the root directory of the Flutter module.
# Optional, defaults to two levels up from the directory of this script.
# MyApp/my_flutter/.ios/Flutter/../..
def
install_flutter_application_pod
(
flutter_application_path
,
flutter_application_name
)
def install_flutter_application_pod(flutter_application_path)
app_framework_dir = File.join(__dir__, 'App.framework')
app_framework_dylib = File.join(app_framework_dir, 'App')
if !File.exist?(app_framework_dylib)
...
...
@@ -81,7 +79,7 @@ def install_flutter_application_pod(flutter_application_path, flutter_applicatio
`echo "static const int Moo = 88;" | xcrun clang -x c -dynamiclib -o "#{app_framework_dylib}" -`
end
pod
flutter_application_name
,
:path
=>
__dir__
,
:inhibit_warnings
=>
true
pod
'{{projectName}}'
, :path => __dir__, :inhibit_warnings => true
# Use relative paths for script phase paths since these strings will likely be checked into source controls.
# Process will be run from project directory.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment