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
395246f0
Unverified
Commit
395246f0
authored
Mar 31, 2021
by
Jenn Magder
Committed by
GitHub
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some globals from the tool (#79422)
parent
ce1db5f1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
12 deletions
+15
-12
assets.dart
...es/flutter_tools/lib/src/build_system/targets/assets.dart
+1
-2
localizations.dart
...ter_tools/lib/src/build_system/targets/localizations.dart
+1
-2
attach.dart
packages/flutter_tools/lib/src/commands/attach.dart
+1
-0
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+1
-0
protocol_discovery.dart
packages/flutter_tools/lib/src/protocol_discovery.dart
+2
-3
flutter_tester.dart
packages/flutter_tools/lib/src/tester/flutter_tester.dart
+1
-0
assets_test.dart
.../test/general.shard/build_system/targets/assets_test.dart
+1
-5
protocol_discovery_test.dart
...ter_tools/test/general.shard/protocol_discovery_test.dart
+7
-0
No files found.
packages/flutter_tools/lib/src/build_system/targets/assets.dart
View file @
395246f0
...
...
@@ -13,7 +13,6 @@ import '../../base/logger.dart';
import
'../../build_info.dart'
;
import
'../../convert.dart'
;
import
'../../devfs.dart'
;
import
'../../globals.dart'
as
globals
;
import
'../build_system.dart'
;
import
'../depfile.dart'
;
import
'common.dart'
;
...
...
@@ -51,7 +50,7 @@ Future<Depfile> copyAssets(Environment environment, Directory outputDirectory, {
final
AssetBundle
assetBundle
=
AssetBundleFactory
.
defaultInstance
(
logger:
environment
.
logger
,
fileSystem:
environment
.
fileSystem
,
platform:
globals
.
platform
,
platform:
environment
.
platform
,
splitDeferredAssets:
buildMode
!=
BuildMode
.
debug
&&
buildMode
!=
BuildMode
.
jitRelease
,
).
createBundle
();
final
int
resultCode
=
await
assetBundle
.
build
(
...
...
packages/flutter_tools/lib/src/build_system/targets/localizations.dart
View file @
395246f0
...
...
@@ -6,7 +6,6 @@
import
'../../base/file_system.dart'
;
import
'../../convert.dart'
;
import
'../../globals.dart'
as
globals
;
import
'../../localizations/gen_l10n.dart'
;
import
'../../localizations/localizations_utils.dart'
;
import
'../build_system.dart'
;
...
...
@@ -53,7 +52,7 @@ class GenerateLocalizationsTarget extends Target {
final
LocalizationOptions
options
=
parseLocalizationsOptions
(
file:
configFile
,
logger:
globals
.
logger
,
logger:
environment
.
logger
,
);
final
DepfileService
depfileService
=
DepfileService
(
logger:
environment
.
logger
,
...
...
packages/flutter_tools/lib/src/commands/attach.dart
View file @
395246f0
...
...
@@ -296,6 +296,7 @@ known, it can be explicitly provided to attach via the command-line, e.g.
ipv6:
ipv6
,
devicePort:
deviceVmservicePort
,
hostPort:
hostVmservicePort
,
logger:
globals
.
logger
,
);
globals
.
printStatus
(
'Waiting for a connection from Flutter on
${device.name}
...'
);
observatoryUri
=
observatoryDiscovery
.
uris
;
...
...
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
395246f0
...
...
@@ -471,6 +471,7 @@ class IOSSimulator extends Device {
ipv6:
ipv6
,
hostPort:
debuggingOptions
.
hostVmServicePort
,
devicePort:
debuggingOptions
.
deviceVmServicePort
,
logger:
globals
.
logger
,
);
}
...
...
packages/flutter_tools/lib/src/protocol_discovery.dart
View file @
395246f0
...
...
@@ -12,7 +12,6 @@ import 'base/io.dart';
import
'base/logger.dart'
;
import
'device.dart'
;
import
'device_port_forwader.dart'
;
import
'globals.dart'
as
globals
;
/// Discovers a specific service protocol on a device, and forwards the service
/// protocol device port to the host.
...
...
@@ -42,7 +41,7 @@ class ProtocolDiscovery {
@required
int
hostPort
,
@required
int
devicePort
,
@required
bool
ipv6
,
Logger
logger
,
// TODO(jonahwilliams): make required.
@required
Logger
logger
,
})
{
const
String
kObservatoryService
=
'Observatory'
;
return
ProtocolDiscovery
.
_
(
...
...
@@ -53,7 +52,7 @@ class ProtocolDiscovery {
hostPort:
hostPort
,
devicePort:
devicePort
,
ipv6:
ipv6
,
logger:
logger
??
globals
.
logger
,
logger:
logger
,
);
}
...
...
packages/flutter_tools/lib/src/tester/flutter_tester.dart
View file @
395246f0
...
...
@@ -206,6 +206,7 @@ class FlutterTesterDevice extends Device {
hostPort:
debuggingOptions
.
hostVmServicePort
,
devicePort:
debuggingOptions
.
deviceVmServicePort
,
ipv6:
ipv6
,
logger:
_logger
,
);
_logReader
.
initializeProcess
(
_process
);
...
...
packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart
View file @
395246f0
...
...
@@ -23,10 +23,8 @@ import '../../../src/context.dart';
void
main
(
)
{
Environment
environment
;
FileSystem
fileSystem
;
Platform
platform
;
setUp
(()
{
platform
=
FakePlatform
();
fileSystem
=
MemoryFileSystem
.
test
();
environment
=
Environment
.
test
(
fileSystem
.
currentDirectory
,
...
...
@@ -34,6 +32,7 @@ void main() {
artifacts:
Artifacts
.
test
(),
fileSystem:
fileSystem
,
logger:
BufferLogger
.
test
(),
platform:
FakePlatform
(),
);
fileSystem
.
file
(
environment
.
buildDir
.
childFile
(
'app.dill'
)).
createSync
(
recursive:
true
);
fileSystem
.
file
(
'packages/flutter_tools/lib/src/build_system/targets/assets.dart'
)
...
...
@@ -82,7 +81,6 @@ flutter:
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
Platform:
()
=>
platform
,
});
testUsingContext
(
'Copies files to correct asset directory'
,
()
async
{
...
...
@@ -98,7 +96,6 @@ flutter:
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
Platform:
()
=>
platform
,
});
testUsingContext
(
'Throws exception if pubspec contains missing files'
,
()
async
{
...
...
@@ -118,7 +115,6 @@ flutter:
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
Platform:
()
=>
platform
,
});
testWithoutContext
(
'processSkSLBundle returns null if there is no path '
...
...
packages/flutter_tools/test/general.shard/protocol_discovery_test.dart
View file @
395246f0
...
...
@@ -4,6 +4,7 @@
// @dart = 2.8
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/device_port_forwader.dart'
;
import
'package:flutter_tools/src/protocol_discovery.dart'
;
import
'package:fake_async/fake_async.dart'
;
...
...
@@ -44,6 +45,7 @@ void main() {
hostPort:
null
,
devicePort:
devicePort
,
throttleDuration:
throttleDuration
,
logger:
BufferLogger
.
test
(),
);
}
...
...
@@ -280,6 +282,7 @@ void main() {
hostPort:
null
,
devicePort:
null
,
ipv6:
false
,
logger:
BufferLogger
.
test
(),
);
// Get next port future.
...
...
@@ -301,6 +304,7 @@ void main() {
hostPort:
1243
,
devicePort:
null
,
ipv6:
false
,
logger:
BufferLogger
.
test
(),
);
// Get next port future.
...
...
@@ -322,6 +326,7 @@ void main() {
hostPort:
0
,
devicePort:
null
,
ipv6:
false
,
logger:
BufferLogger
.
test
(),
);
// Get next port future.
...
...
@@ -343,6 +348,7 @@ void main() {
hostPort:
54777
,
ipv6:
true
,
devicePort:
null
,
logger:
BufferLogger
.
test
(),
);
// Get next port future.
...
...
@@ -364,6 +370,7 @@ void main() {
hostPort:
54777
,
ipv6:
true
,
devicePort:
null
,
logger:
BufferLogger
.
test
(),
);
// Get next port future.
...
...
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