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/framework.dart';
|
||||||
import 'package:flutter_devicelab/framework/utils.dart';
|
import 'package:flutter_devicelab/framework/utils.dart';
|
||||||
|
|
||||||
|
|
||||||
|
final String platformLineSep = Platform.isWindows ? '\r\n' : '\n';
|
||||||
|
|
||||||
final List<String> flutterAssets = <String>[
|
final List<String> flutterAssets = <String>[
|
||||||
'assets/flutter_assets/AssetManifest.json',
|
'assets/flutter_assets/AssetManifest.json',
|
||||||
'assets/flutter_assets/NOTICES',
|
'assets/flutter_assets/NOTICES',
|
||||||
@ -267,8 +270,8 @@ subprojects {
|
|||||||
final File pubspec = File(path.join(rootPath, 'pubspec.yaml'));
|
final File pubspec = File(path.join(rootPath, 'pubspec.yaml'));
|
||||||
String content = await pubspec.readAsString();
|
String content = await pubspec.readAsString();
|
||||||
content = content.replaceFirst(
|
content = content.replaceFirst(
|
||||||
'\ndependencies:\n',
|
'${platformLineSep}dependencies:$platformLineSep',
|
||||||
'\ndependencies:\n $plugin:\n',
|
'${platformLineSep}dependencies:$platformLineSep $plugin:$platformLineSep',
|
||||||
);
|
);
|
||||||
await pubspec.writeAsString(content, flush: true);
|
await pubspec.writeAsString(content, flush: true);
|
||||||
}
|
}
|
||||||
@ -315,7 +318,7 @@ android {
|
|||||||
path.join(parent.path, 'hello', 'pubspec.yaml')
|
path.join(parent.path, 'hello', 'pubspec.yaml')
|
||||||
);
|
);
|
||||||
final String contents = pubspec.readAsStringSync();
|
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:
|
flutter:
|
||||||
assets:
|
assets:
|
||||||
- lib/gallery/example_code.dart
|
- lib/gallery/example_code.dart
|
||||||
|
@ -357,6 +357,13 @@
|
|||||||
"enabled":true,
|
"enabled":true,
|
||||||
"run_if":["dev/**", "bin/**"]
|
"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",
|
"name": "Windows gradle_r8_test",
|
||||||
"repo": "flutter",
|
"repo": "flutter",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user