Fix gradle_plugin_light_apk test. (#66496)
This commit is contained in:
parent
faa4b6635a
commit
57cda51f7e
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user