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
02510dd8
Commit
02510dd8
authored
Nov 19, 2015
by
Kris Giesing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow run_mojo --android to specify location of flutter engine
parent
0e290946
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
run_mojo.dart
packages/flutter_tools/lib/src/commands/run_mojo.dart
+10
-4
No files found.
packages/flutter_tools/lib/src/commands/run_mojo.dart
View file @
02510dd8
...
...
@@ -70,7 +70,8 @@ class RunMojoCommand extends FlutterCommand {
BuildConfiguration
_getCurrentHostConfig
()
{
BuildConfiguration
result
;
TargetPlatform
target
=
getCurrentHostPlatformAsTarget
();
TargetPlatform
target
=
argResults
[
'android'
]
?
TargetPlatform
.
android
:
getCurrentHostPlatformAsTarget
();
for
(
BuildConfiguration
config
in
buildConfigurations
)
{
if
(
config
.
targetPlatform
==
target
)
{
result
=
config
;
...
...
@@ -87,20 +88,25 @@ class RunMojoCommand extends FlutterCommand {
final
String
command
=
useDevtools
?
_getDevtoolsPath
()
:
_getMojoShellPath
();
args
.
add
(
command
);
BuildConfiguration
config
=
_getCurrentHostConfig
();
if
(
argResults
[
'android'
])
{
args
.
add
(
'--android'
);
final
String
cloudStorageBaseUrl
=
ArtifactStore
.
getCloudStorageBaseUrl
(
'android-arm'
);
final
String
appPath
=
_makePathAbsolute
(
bundlePath
);
final
String
appName
=
path
.
basename
(
appPath
);
final
String
appDir
=
path
.
dirname
(
appPath
);
args
.
add
(
'http://app/
$appName
'
);
args
.
add
(
'--map-origin=http://app/=
$appDir
'
);
args
.
add
(
'--map-origin=http://flutter/=
$cloudStorageBaseUrl
'
);
if
(
config
==
null
||
config
.
type
==
BuildType
.
prebuilt
)
{
final
String
cloudStorageBaseUrl
=
ArtifactStore
.
getCloudStorageBaseUrl
(
'android-arm'
);
args
.
add
(
'--map-origin=http://flutter/=
$cloudStorageBaseUrl
'
);
}
else
{
args
.
add
(
'--map-origin=http://flutter/=
${config.buildDir}
'
);
}
args
.
add
(
'--url-mappings=mojo:flutter=http://flutter/flutter.mojo'
);
}
else
{
final
String
appPath
=
_makePathAbsolute
(
bundlePath
);
String
flutterPath
;
BuildConfiguration
config
=
_getCurrentHostConfig
();
if
(
config
==
null
||
config
.
type
==
BuildType
.
prebuilt
)
{
Artifact
artifact
=
ArtifactStore
.
getArtifact
(
type:
ArtifactType
.
mojo
,
targetPlatform:
TargetPlatform
.
linux
);
flutterPath
=
_makePathAbsolute
(
await
ArtifactStore
.
getPath
(
artifact
));
...
...
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