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
66fd0b28
Unverified
Commit
66fd0b28
authored
Jun 24, 2021
by
gaaclarke
Committed by
GitHub
Jun 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced unawaited with synchronous / await calls where needed (#82839)
parent
7f15662f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
18 deletions
+16
-18
run.dart
dev/devicelab/bin/run.dart
+1
-2
flutter_engine_group_performance.dart
...devicelab/bin/tasks/flutter_engine_group_performance.dart
+1
-2
gradle_desugar_classes_test.dart
dev/devicelab/bin/tasks/gradle_desugar_classes_test.dart
+1
-2
gradle_plugin_light_apk_test.dart
dev/devicelab/bin/tasks/gradle_plugin_light_apk_test.dart
+3
-4
ios_content_validation_test.dart
dev/devicelab/bin/tasks/ios_content_validation_test.dart
+6
-3
apk_utils.dart
dev/devicelab/lib/framework/apk_utils.dart
+3
-3
build_test_task.dart
dev/devicelab/lib/tasks/build_test_task.dart
+1
-2
No files found.
dev/devicelab/bin/run.dart
View file @
66fd0b28
...
...
@@ -8,7 +8,6 @@ import 'dart:convert';
import
'dart:io'
;
import
'package:args/args.dart'
;
import
'package:flutter_devicelab/common.dart'
;
import
'package:flutter_devicelab/framework/ab.dart'
;
import
'package:flutter_devicelab/framework/manifest.dart'
;
import
'package:flutter_devicelab/framework/runner.dart'
;
...
...
@@ -186,7 +185,7 @@ Future<void> _runABTest() async {
abTest
.
finalize
();
final
File
jsonFile
=
_uniqueFile
(
args
[
'ab-result-file'
]
as
String
??
'ABresults#.json'
);
unawaited
(
jsonFile
.
writeAsString
(
const
JsonEncoder
.
withIndent
(
' '
).
convert
(
abTest
.
jsonMap
)
));
jsonFile
.
writeAsStringSync
(
const
JsonEncoder
.
withIndent
(
' '
).
convert
(
abTest
.
jsonMap
));
if
(!
silent
)
{
section
(
'Raw results'
);
...
...
dev/devicelab/bin/tasks/flutter_engine_group_performance.dart
View file @
66fd0b28
...
...
@@ -6,7 +6,6 @@
import
'dart:io'
;
import
'package:flutter_devicelab/common.dart'
;
import
'package:flutter_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
...
...
@@ -109,5 +108,5 @@ Future<TaskResult> _doTest() async {
}
Future
<
void
>
main
()
async
{
unawaited
(
task
(
_doTest
)
);
await
task
(
_doTest
);
}
dev/devicelab/bin/tasks/gradle_desugar_classes_test.dart
View file @
66fd0b28
...
...
@@ -6,7 +6,6 @@
import
'dart:io'
;
import
'package:flutter_devicelab/common.dart'
;
import
'package:flutter_devicelab/framework/apk_utils.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
...
...
@@ -18,7 +17,7 @@ Future<void> main() async {
try
{
await
runProjectTest
((
FlutterProject
flutterProject
)
async
{
section
(
'APK contains plugin classes'
);
unawaited
(
flutterProject
.
addPlugin
(
'google_maps_flutter'
,
value:
'^1.0.10'
)
);
flutterProject
.
addPlugin
(
'google_maps_flutter'
,
value:
'^1.0.10'
);
await
inDirectory
(
flutterProject
.
rootPath
,
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
...
...
dev/devicelab/bin/tasks/gradle_plugin_light_apk_test.dart
View file @
66fd0b28
...
...
@@ -6,7 +6,6 @@
import
'dart:io'
;
import
'package:flutter_devicelab/common.dart'
;
import
'package:flutter_devicelab/framework/apk_utils.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
...
...
@@ -220,8 +219,8 @@ Future<void> main() async {
});
section
(
'Configure'
);
unawaited
(
project
.
addPlugin
(
'plugin_under_test'
,
value:
'
$platformLineSep
path:
${pluginDir.path}
'
)
)
;
project
.
addPlugin
(
'plugin_under_test'
,
value:
'
$platformLineSep
path:
${pluginDir.path}
'
);
await
project
.
addCustomBuildType
(
'local'
,
initWith:
'debug'
);
await
project
.
getPackages
();
...
...
@@ -240,7 +239,7 @@ Future<void> main() async {
await
project
.
addCustomBuildType
(
'local'
,
initWith:
'debug'
);
await
project
.
addGlobalBuildType
(
'local'
,
initWith:
'debug'
);
section
(
'Add plugin'
);
await
project
.
addPlugin
(
'path_provider'
);
project
.
addPlugin
(
'path_provider'
);
await
project
.
getPackages
();
await
project
.
runGradleTask
(
'assembleLocal'
);
...
...
dev/devicelab/bin/tasks/ios_content_validation_test.dart
View file @
66fd0b28
...
...
@@ -6,7 +6,6 @@
import
'dart:io'
;
import
'package:flutter_devicelab/common.dart'
;
import
'package:flutter_devicelab/framework/apk_utils.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
...
...
@@ -56,7 +55,8 @@ Future<void> main() async {
'Flutter'
,
);
// Exits 0 only if codesigned.
unawaited
(
eval
(
'xcrun'
,
<
String
>[
'codesign'
,
'--verify'
,
flutterFramework
]));
final
Future
<
String
>
flutterCodesign
=
eval
(
'xcrun'
,
<
String
>[
'codesign'
,
'--verify'
,
flutterFramework
]);
final
String
appFramework
=
path
.
join
(
appBundle
.
path
,
...
...
@@ -64,7 +64,10 @@ Future<void> main() async {
'App.framework'
,
'App'
,
);
unawaited
(
eval
(
'xcrun'
,
<
String
>[
'codesign'
,
'--verify'
,
appFramework
]));
final
Future
<
String
>
appCodesign
=
eval
(
'xcrun'
,
<
String
>[
'codesign'
,
'--verify'
,
appFramework
]);
await
flutterCodesign
;
await
appCodesign
;
});
return
TaskResult
.
success
(
null
);
...
...
dev/devicelab/lib/framework/apk_utils.dart
View file @
66fd0b28
...
...
@@ -299,14 +299,14 @@ subprojects {
/// Adds a plugin to the pubspec.
/// In pubspec, each dependency is expressed as key, value pair joined by a colon `:`.
/// such as `plugin_a`:`^0.0.1` or `plugin_a`:`\npath: /some/path`.
Future
<
void
>
addPlugin
(
String
plugin
,
{
String
value
=
''
})
async
{
void
addPlugin
(
String
plugin
,
{
String
value
=
''
})
{
final
File
pubspec
=
File
(
path
.
join
(
rootPath
,
'pubspec.yaml'
));
String
content
=
await
pubspec
.
readAsString
();
String
content
=
pubspec
.
readAsStringSync
();
content
=
content
.
replaceFirst
(
'
${platformLineSep}
dependencies:
$platformLineSep
'
,
'
${platformLineSep}
dependencies:
$platformLineSep
$plugin
:
$value$platformLineSep
'
,
);
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
pubspec
.
writeAsStringSync
(
content
,
flush:
true
);
}
Future
<
void
>
getPackages
()
async
{
...
...
dev/devicelab/lib/tasks/build_test_task.dart
View file @
66fd0b28
...
...
@@ -7,7 +7,6 @@
import
'dart:io'
;
import
'package:args/args.dart'
;
import
'package:flutter_devicelab/common.dart'
;
import
'../framework/devices.dart'
;
import
'../framework/task_result.dart'
;
...
...
@@ -109,7 +108,7 @@ abstract class BuildTestTask {
}
if
(!
testOnly
)
{
unawaited
(
build
()
);
await
build
(
);
}
if
(
buildOnly
)
{
...
...
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