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
6a22f412
Unverified
Commit
6a22f412
authored
Apr 23, 2019
by
Jonah Williams
Committed by
GitHub
Apr 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add desktop artifacts to run/target_platform selectors (#31505)
parent
ca0e7789
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
40 deletions
+42
-40
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+42
-40
No files found.
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
6a22f412
...
...
@@ -621,26 +621,9 @@ mixin DeviceBasedDevelopmentArtifacts on FlutterCommand {
};
for
(
Device
device
in
devices
)
{
final
TargetPlatform
targetPlatform
=
await
device
.
targetPlatform
;
switch
(
targetPlatform
)
{
case
TargetPlatform
.
android_arm
:
case
TargetPlatform
.
android_arm64
:
case
TargetPlatform
.
android_x64
:
case
TargetPlatform
.
android_x86
:
artifacts
.
add
(
DevelopmentArtifact
.
android
);
break
;
case
TargetPlatform
.
web
:
artifacts
.
add
(
DevelopmentArtifact
.
web
);
break
;
case
TargetPlatform
.
ios
:
artifacts
.
add
(
DevelopmentArtifact
.
iOS
);
break
;
case
TargetPlatform
.
darwin_x64
:
case
TargetPlatform
.
fuchsia
:
case
TargetPlatform
.
tester
:
case
TargetPlatform
.
windows_x64
:
case
TargetPlatform
.
linux_x64
:
// No artifacts currently supported.
break
;
final
DevelopmentArtifact
developmentArtifact
=
_artifactFromTargetPlatform
(
targetPlatform
);
if
(
developmentArtifact
!=
null
)
{
artifacts
.
add
(
developmentArtifact
);
}
}
return
artifacts
;
...
...
@@ -663,29 +646,48 @@ mixin TargetPlatformBasedDevelopmentArtifacts on FlutterCommand {
final
Set
<
DevelopmentArtifact
>
artifacts
=
<
DevelopmentArtifact
>{
DevelopmentArtifact
.
universal
,
};
final
DevelopmentArtifact
developmentArtifact
=
_artifactFromTargetPlatform
(
targetPlatform
);
if
(
developmentArtifact
!=
null
)
{
artifacts
.
add
(
developmentArtifact
);
}
return
artifacts
;
}
}
// Returns the development artifact for the target platform, or null
// if none is supported
DevelopmentArtifact
_artifactFromTargetPlatform
(
TargetPlatform
targetPlatform
)
{
switch
(
targetPlatform
)
{
case
TargetPlatform
.
android_arm
:
case
TargetPlatform
.
android_arm64
:
case
TargetPlatform
.
android_x64
:
case
TargetPlatform
.
android_x86
:
artifacts
.
add
(
DevelopmentArtifact
.
android
);
break
;
return
DevelopmentArtifact
.
android
;
case
TargetPlatform
.
web
:
artifacts
.
add
(
DevelopmentArtifact
.
web
);
break
;
return
DevelopmentArtifact
.
web
;
case
TargetPlatform
.
ios
:
artifacts
.
add
(
DevelopmentArtifact
.
iOS
);
break
;
return
DevelopmentArtifact
.
iOS
;
case
TargetPlatform
.
darwin_x64
:
case
TargetPlatform
.
fuchsia
:
case
TargetPlatform
.
tester
:
if
(!
FlutterVersion
.
instance
.
isStable
)
{
return
DevelopmentArtifact
.
macOS
;
}
return
null
;
case
TargetPlatform
.
windows_x64
:
if
(!
FlutterVersion
.
instance
.
isStable
)
{
return
DevelopmentArtifact
.
windows
;
}
return
null
;
case
TargetPlatform
.
linux_x64
:
// No artifacts currently supported.
break
;
if
(!
FlutterVersion
.
instance
.
isStable
)
{
return
DevelopmentArtifact
.
linux
;
}
return
artifacts
;
return
null
;
case
TargetPlatform
.
fuchsia
:
case
TargetPlatform
.
tester
:
// No artifacts currently supported.
return
null
;
}
return
null
;
}
/// A command which runs less analytics and checks to speed up startup time.
...
...
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