Fix gradle_plugin_light_apk test. (#66496)

This commit is contained in:
godofredoc 2020-09-23 16:52:02 -07:00 committed by GitHub
parent faa4b6635a
commit 57cda51f7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -8,6 +8,9 @@ import 'package:path/path.dart' as path;
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/utils.dart';
final String platformLineSep = Platform.isWindows ? '\r\n' : '\n';
final List<String> flutterAssets = <String>[
'assets/flutter_assets/AssetManifest.json',
'assets/flutter_assets/NOTICES',
@ -267,8 +270,8 @@ subprojects {
final File pubspec = File(path.join(rootPath, 'pubspec.yaml'));
String content = await pubspec.readAsString();
content = content.replaceFirst(
'\ndependencies:\n',
'\ndependencies:\n $plugin:\n',
'${platformLineSep}dependencies:$platformLineSep',
'${platformLineSep}dependencies:$platformLineSep $plugin:$platformLineSep',
);
await pubspec.writeAsString(content, flush: true);
}
@ -315,7 +318,7 @@ android {
path.join(parent.path, 'hello', 'pubspec.yaml')
);
final String contents = pubspec.readAsStringSync();
final String newContents = contents.replaceFirst('# The following section is specific to Flutter.\nflutter:\n', '''
final String newContents = contents.replaceFirst('# The following section is specific to Flutter.${platformLineSep}flutter:$platformLineSep', '''
flutter:
assets:
- lib/gallery/example_code.dart

View File

@ -357,6 +357,13 @@
"enabled":true,
"run_if":["dev/**", "bin/**"]
},
{
"name": "Windows gradle_plugin_light_apk_test",
"repo": "flutter",
"task_name": "win_gradle_plugin_light_apk_test",
"enabled":true,
"run_if":["dev/**", "bin/**"]
},
{
"name": "Windows gradle_r8_test",
"repo": "flutter",