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
556e374e
Unverified
Commit
556e374e
authored
Jul 03, 2019
by
Jonah Williams
Committed by
GitHub
Jul 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix default artifacts to exclude ios and android (#35303)
parent
763ce632
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
doctor.dart
packages/flutter_tools/lib/src/commands/doctor.dart
+11
-0
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+1
-4
install_test.dart
packages/flutter_tools/test/commands/install_test.dart
+11
-0
No files found.
packages/flutter_tools/lib/src/commands/doctor.dart
View file @
556e374e
...
@@ -30,6 +30,17 @@ class DoctorCommand extends FlutterCommand {
...
@@ -30,6 +30,17 @@ class DoctorCommand extends FlutterCommand {
@override
@override
final
String
description
=
'Show information about the installed tooling.'
;
final
String
description
=
'Show information about the installed tooling.'
;
@override
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
{
return
<
DevelopmentArtifact
>{
DevelopmentArtifact
.
universal
,
// This is required because we use gen_snapshot to check if the host
// machine can execute the provided artifacts. See `_genSnapshotRuns`
// in `doctor.dart`.
DevelopmentArtifact
.
android
,
};
}
@override
@override
Future
<
FlutterCommandResult
>
runCommand
()
async
{
Future
<
FlutterCommandResult
>
runCommand
()
async
{
if
(
argResults
.
wasParsed
(
'check-for-remote-artifacts'
))
{
if
(
argResults
.
wasParsed
(
'check-for-remote-artifacts'
))
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
556e374e
...
@@ -479,12 +479,9 @@ abstract class FlutterCommand extends Command<void> {
...
@@ -479,12 +479,9 @@ abstract class FlutterCommand extends Command<void> {
/// The set of development artifacts required for this command.
/// The set of development artifacts required for this command.
///
///
/// Defaults to [DevelopmentArtifact.universal],
/// Defaults to [DevelopmentArtifact.universal].
/// [DevelopmentArtifact.android], and [DevelopmentArtifact.iOS].
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
=>
const
<
DevelopmentArtifact
>{
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
=>
const
<
DevelopmentArtifact
>{
DevelopmentArtifact
.
universal
,
DevelopmentArtifact
.
universal
,
DevelopmentArtifact
.
iOS
,
DevelopmentArtifact
.
android
,
};
};
/// Subclasses must implement this to execute the command.
/// Subclasses must implement this to execute the command.
...
...
packages/flutter_tools/test/commands/install_test.dart
View file @
556e374e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/commands/install.dart'
;
import
'package:flutter_tools/src/commands/install.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:mockito/mockito.dart'
;
...
@@ -11,6 +12,10 @@ import '../src/mocks.dart';
...
@@ -11,6 +12,10 @@ import '../src/mocks.dart';
void
main
(
)
{
void
main
(
)
{
group
(
'install'
,
()
{
group
(
'install'
,
()
{
setUpAll
(()
{
Cache
.
disableLocking
();
});
testUsingContext
(
'returns 0 when Android is connected and ready for an install'
,
()
async
{
testUsingContext
(
'returns 0 when Android is connected and ready for an install'
,
()
async
{
final
InstallCommand
command
=
InstallCommand
();
final
InstallCommand
command
=
InstallCommand
();
applyMocksToCommand
(
command
);
applyMocksToCommand
(
command
);
...
@@ -21,6 +26,8 @@ void main() {
...
@@ -21,6 +26,8 @@ void main() {
testDeviceManager
.
addDevice
(
device
);
testDeviceManager
.
addDevice
(
device
);
await
createTestCommandRunner
(
command
).
run
(<
String
>[
'install'
]);
await
createTestCommandRunner
(
command
).
run
(<
String
>[
'install'
]);
},
overrides:
<
Type
,
Generator
>{
Cache:
()
=>
MockCache
(),
});
});
testUsingContext
(
'returns 0 when iOS is connected and ready for an install'
,
()
async
{
testUsingContext
(
'returns 0 when iOS is connected and ready for an install'
,
()
async
{
...
@@ -33,6 +40,10 @@ void main() {
...
@@ -33,6 +40,10 @@ void main() {
testDeviceManager
.
addDevice
(
device
);
testDeviceManager
.
addDevice
(
device
);
await
createTestCommandRunner
(
command
).
run
(<
String
>[
'install'
]);
await
createTestCommandRunner
(
command
).
run
(<
String
>[
'install'
]);
},
overrides:
<
Type
,
Generator
>{
Cache:
()
=>
MockCache
(),
});
});
});
});
}
}
class
MockCache
extends
Mock
implements
Cache
{}
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