forked from firka/flutter
Replace \r\n code with Dart SDK standard conventions. (#159346)
Also deleted a file that appeared to be unused.
This commit is contained in:
@@ -9,8 +9,6 @@ import 'package:path/path.dart' as path;
|
||||
import 'task_result.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
final String platformLineSep = Platform.isWindows ? '\r\n' : '\n';
|
||||
|
||||
final List<String> flutterAssets = <String>[
|
||||
'assets/flutter_assets/AssetManifest.json',
|
||||
'assets/flutter_assets/NOTICES.Z',
|
||||
@@ -280,8 +278,8 @@ android {
|
||||
final File pubspec = File(path.join(rootPath, 'pubspec.yaml'));
|
||||
String content = pubspec.readAsStringSync();
|
||||
content = content.replaceFirst(
|
||||
'${platformLineSep}dependencies:$platformLineSep',
|
||||
'${platformLineSep}dependencies:$platformLineSep $plugin: $value$platformLineSep',
|
||||
'${Platform.lineTerminator}dependencies:${Platform.lineTerminator}',
|
||||
'${Platform.lineTerminator}dependencies:${Platform.lineTerminator} $plugin: $value${Platform.lineTerminator}',
|
||||
);
|
||||
pubspec.writeAsStringSync(content, flush: true);
|
||||
}
|
||||
@@ -336,7 +334,7 @@ android {
|
||||
path.join(parent.path, 'hello', 'pubspec.yaml')
|
||||
);
|
||||
final String contents = pubspec.readAsStringSync();
|
||||
final String newContents = contents.replaceFirst('${platformLineSep}flutter:$platformLineSep', '''
|
||||
final String newContents = contents.replaceFirst('${Platform.lineTerminator}flutter:${Platform.lineTerminator}', '''
|
||||
|
||||
flutter:
|
||||
assets:
|
||||
|
||||
Reference in New Issue
Block a user