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
b5754d44
Commit
b5754d44
authored
Nov 09, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #177 from abarth/search_for_snapshotter
Search all the build configurations for sky_snapshot
parents
aafce51e
7e8b111b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
17 deletions
+25
-17
flutter_command_runner.dart
...lutter_tools/lib/src/commands/flutter_command_runner.dart
+12
-12
toolchain.dart
packages/flutter_tools/lib/src/toolchain.dart
+13
-5
No files found.
packages/flutter_tools/lib/src/commands/flutter_command_runner.dart
View file @
b5754d44
...
...
@@ -195,19 +195,19 @@ class FlutterCommandRunner extends CommandRunner {
configs
.
add
(
new
BuildConfiguration
.
local
(
type:
BuildType
.
debug
,
hostPlatform:
hostPlatform
,
targetPlatform:
hostPlatformAsTarget
,
targetPlatform:
TargetPlatform
.
android
,
enginePath:
enginePath
,
buildPath:
globalResults
[
'
host
-debug-build-path'
],
testable:
true
buildPath:
globalResults
[
'
android
-debug-build-path'
],
deviceId:
globalResults
[
'android-device-id'
]
));
configs
.
add
(
new
BuildConfiguration
.
local
(
type:
BuildType
.
debug
,
hostPlatform:
hostPlatform
,
targetPlatform:
TargetPlatform
.
android
,
targetPlatform:
hostPlatformAsTarget
,
enginePath:
enginePath
,
buildPath:
globalResults
[
'
android
-debug-build-path'
],
deviceId:
globalResults
[
'android-device-id'
]
buildPath:
globalResults
[
'
host
-debug-build-path'
],
testable:
true
));
if
(
Platform
.
isMacOS
)
{
...
...
@@ -233,19 +233,19 @@ class FlutterCommandRunner extends CommandRunner {
configs
.
add
(
new
BuildConfiguration
.
local
(
type:
BuildType
.
release
,
hostPlatform:
hostPlatform
,
targetPlatform:
hostPlatformAsTarget
,
targetPlatform:
TargetPlatform
.
android
,
enginePath:
enginePath
,
buildPath:
globalResults
[
'
host
-release-build-path'
],
testable:
true
buildPath:
globalResults
[
'
android
-release-build-path'
],
deviceId:
globalResults
[
'android-device-id'
]
));
configs
.
add
(
new
BuildConfiguration
.
local
(
type:
BuildType
.
release
,
hostPlatform:
hostPlatform
,
targetPlatform:
TargetPlatform
.
android
,
targetPlatform:
hostPlatformAsTarget
,
enginePath:
enginePath
,
buildPath:
globalResults
[
'
android
-release-build-path'
],
deviceId:
globalResults
[
'android-device-id'
]
buildPath:
globalResults
[
'
host
-release-build-path'
],
testable:
true
));
if
(
Platform
.
isMacOS
)
{
...
...
packages/flutter_tools/lib/src/toolchain.dart
View file @
b5754d44
...
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
;
import
'package:path/path.dart'
as
path
;
...
...
@@ -29,8 +30,12 @@ class Compiler {
}
Future
<
String
>
_getCompilerPath
(
BuildConfiguration
config
)
async
{
if
(
config
.
type
!=
BuildType
.
prebuilt
)
return
path
.
join
(
config
.
buildDir
,
'clang_x64'
,
'sky_snapshot'
);
if
(
config
.
type
!=
BuildType
.
prebuilt
)
{
String
compilerPath
=
path
.
join
(
config
.
buildDir
,
'clang_x64'
,
'sky_snapshot'
);
if
(
FileSystemEntity
.
isFileSync
(
compilerPath
))
return
compilerPath
;
return
null
;
}
Artifact
artifact
=
ArtifactStore
.
getArtifact
(
type:
ArtifactType
.
snapshot
,
hostPlatform:
config
.
hostPlatform
);
return
await
ArtifactStore
.
getPath
(
artifact
);
...
...
@@ -42,8 +47,11 @@ class Toolchain {
final
Compiler
compiler
;
static
Future
<
Toolchain
>
forConfigs
(
List
<
BuildConfiguration
>
configs
)
async
{
// TODO(abarth): Shouldn't we consider all the configs?
String
compilerPath
=
await
_getCompilerPath
(
configs
.
first
);
for
(
BuildConfiguration
config
in
configs
)
{
String
compilerPath
=
await
_getCompilerPath
(
config
);
if
(
compilerPath
!=
null
)
return
new
Toolchain
(
compiler:
new
Compiler
(
compilerPath
));
}
return
null
;
}
}
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