use raw strings to avoid escaping (#50322)
This commit is contained in:
committed by
GitHub
parent
8735ab1e35
commit
b953c3e5a8
@@ -73,7 +73,7 @@ Future<void> main() async {
|
||||
|
||||
section('Override settings.gradle V2');
|
||||
|
||||
const String deprecatedFileContentV2 = '''
|
||||
const String deprecatedFileContentV2 = r'''
|
||||
include ':app'
|
||||
|
||||
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
|
||||
@@ -86,8 +86,8 @@ if (pluginsFile.exists()) {
|
||||
|
||||
plugins.each { name, path ->
|
||||
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
|
||||
include ":\$name"
|
||||
project(":\$name").projectDir = pluginDirectory
|
||||
include ":$name"
|
||||
project(":$name").projectDir = pluginDirectory
|
||||
}
|
||||
''';
|
||||
settingsGradle.writeAsStringSync(deprecatedFileContentV2, flush: true);
|
||||
|
||||
@@ -588,7 +588,7 @@ String extractCloudAuthTokenArg(List<String> rawArgs) {
|
||||
|
||||
final RegExp _obsRegExp =
|
||||
RegExp('An Observatory debugger .* is available at: ');
|
||||
final RegExp _obsPortRegExp = RegExp('(\\S+:(\\d+)/\\S*)\$');
|
||||
final RegExp _obsPortRegExp = RegExp(r'(\S+:(\d+)/\S*)$');
|
||||
final RegExp _obsUriRegExp = RegExp(r'((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
|
||||
|
||||
/// Tries to extract a port from the string.
|
||||
|
||||
@@ -777,7 +777,7 @@ class ListStatistics {
|
||||
|
||||
class _UnzipListEntry {
|
||||
factory _UnzipListEntry.fromLine(String line) {
|
||||
final List<String> data = line.trim().split(RegExp('\\s+'));
|
||||
final List<String> data = line.trim().split(RegExp(r'\s+'));
|
||||
assert(data.length == 8);
|
||||
return _UnzipListEntry._(
|
||||
uncompressedSize: int.parse(data[0]),
|
||||
|
||||
Reference in New Issue
Block a user