start multiline strings with newline (#50825)
This commit is contained in:
committed by
GitHub
parent
af17860513
commit
7d7ac7c32b
@@ -489,7 +489,8 @@ String _readFileContent(File file) {
|
||||
return file.existsSync() ? file.readAsStringSync() : null;
|
||||
}
|
||||
|
||||
const String _androidPluginRegistryTemplateOldEmbedding = '''package io.flutter.plugins;
|
||||
const String _androidPluginRegistryTemplateOldEmbedding = '''
|
||||
package io.flutter.plugins;
|
||||
|
||||
import io.flutter.plugin.common.PluginRegistry;
|
||||
{{#plugins}}
|
||||
@@ -520,7 +521,8 @@ public final class GeneratedPluginRegistrant {
|
||||
}
|
||||
''';
|
||||
|
||||
const String _androidPluginRegistryTemplateNewEmbedding = '''package io.flutter.plugins;
|
||||
const String _androidPluginRegistryTemplateNewEmbedding = '''
|
||||
package io.flutter.plugins;
|
||||
|
||||
{{#androidX}}
|
||||
import androidx.annotation.Keep;
|
||||
@@ -646,7 +648,8 @@ Future<void> _writeAndroidPluginRegistrant(FlutterProject project, List<Plugin>
|
||||
);
|
||||
}
|
||||
|
||||
const String _objcPluginRegistryHeaderTemplate = '''//
|
||||
const String _objcPluginRegistryHeaderTemplate = '''
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -665,7 +668,8 @@ NS_ASSUME_NONNULL_END
|
||||
#endif /* GeneratedPluginRegistrant_h */
|
||||
''';
|
||||
|
||||
const String _objcPluginRegistryImplementationTemplate = '''//
|
||||
const String _objcPluginRegistryImplementationTemplate = '''
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -690,7 +694,8 @@ const String _objcPluginRegistryImplementationTemplate = '''//
|
||||
@end
|
||||
''';
|
||||
|
||||
const String _swiftPluginRegistryTemplate = '''//
|
||||
const String _swiftPluginRegistryTemplate = '''
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -736,7 +741,8 @@ Depends on all your plugins, and provides a function to register them.
|
||||
end
|
||||
''';
|
||||
|
||||
const String _dartPluginRegistryTemplate = '''//
|
||||
const String _dartPluginRegistryTemplate = '''
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -757,7 +763,8 @@ void registerPlugins(PluginRegistry registry) {
|
||||
}
|
||||
''';
|
||||
|
||||
const String _cppPluginRegistryHeaderTemplate = '''//
|
||||
const String _cppPluginRegistryHeaderTemplate = '''
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -772,7 +779,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry);
|
||||
#endif // GENERATED_PLUGIN_REGISTRANT_
|
||||
''';
|
||||
|
||||
const String _cppPluginRegistryImplementationTemplate = '''//
|
||||
const String _cppPluginRegistryImplementationTemplate = '''
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ class GitHubTemplateCreator {
|
||||
String doctorText
|
||||
) async {
|
||||
final String title = '[tool_crash] $errorString';
|
||||
final String body = '''## Command
|
||||
final String body = '''
|
||||
## Command
|
||||
```
|
||||
$command
|
||||
```
|
||||
|
||||
@@ -41,7 +41,8 @@ void main() {
|
||||
} else {
|
||||
flutterRootUri.write(canonicalizedFlutterRootPath);
|
||||
}
|
||||
final String dotPackagesSrc = '''# Generated
|
||||
final String dotPackagesSrc = '''
|
||||
# Generated
|
||||
flutter:$flutterRootUri/packages/flutter/lib/
|
||||
sky_engine:$flutterRootUri/bin/cache/pkg/sky_engine/lib/
|
||||
flutter_project:lib/
|
||||
@@ -357,7 +358,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
}
|
||||
''';
|
||||
|
||||
const String pubspecYamlSrc = r'''name: flutter_project
|
||||
const String pubspecYamlSrc = r'''
|
||||
name: flutter_project
|
||||
environment:
|
||||
sdk: ">=2.1.0 <3.0.0"
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(cons
|
||||
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
||||
Platform: _kNoColorTerminalPlatform,
|
||||
};
|
||||
const String samplesIndexJson = '''[
|
||||
const String samplesIndexJson = '''
|
||||
[
|
||||
{ "id": "sample1" },
|
||||
{ "id": "sample2" }
|
||||
]''';
|
||||
|
||||
@@ -1669,8 +1669,8 @@ plugin1=${plugin1.path}
|
||||
|
||||
fileSystem.file('out/android_arm/flutter_embedding_release.pom')
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync(
|
||||
'''<?xml version="1.0" encoding="UTF-8"?>
|
||||
..writeAsStringSync('''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<version>1.0.0-73fd6b049a80bcea2db1f26c7cee434907cd188b</version>
|
||||
<dependencies>
|
||||
@@ -1761,8 +1761,8 @@ plugin1=${plugin1.path}
|
||||
|
||||
fileSystem.file('out/android_arm/flutter_embedding_release.pom')
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync(
|
||||
'''<?xml version="1.0" encoding="UTF-8"?>
|
||||
..writeAsStringSync('''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<version>1.0.0-73fd6b049a80bcea2db1f26c7cee434907cd188b</version>
|
||||
<dependencies>
|
||||
|
||||
@@ -396,8 +396,8 @@ void main() {
|
||||
});
|
||||
}
|
||||
|
||||
const String _aaptDataWithExplicitEnabledAndMainLauncherActivity =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithExplicitEnabledAndMainLauncherActivity = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1")
|
||||
@@ -437,8 +437,8 @@ const String _aaptDataWithExplicitEnabledAndMainLauncherActivity =
|
||||
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")''';
|
||||
|
||||
|
||||
const String _aaptDataWithDefaultEnabledAndMainLauncherActivity =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithDefaultEnabledAndMainLauncherActivity = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1")
|
||||
@@ -477,8 +477,8 @@ const String _aaptDataWithDefaultEnabledAndMainLauncherActivity =
|
||||
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")''';
|
||||
|
||||
|
||||
const String _aaptDataWithNoEnabledActivity =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithNoEnabledActivity = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1")
|
||||
@@ -507,8 +507,8 @@ const String _aaptDataWithNoEnabledActivity =
|
||||
E: category (line=45)
|
||||
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")''';
|
||||
|
||||
const String _aaptDataWithNoMainActivity =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithNoMainActivity = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1")
|
||||
@@ -535,8 +535,8 @@ const String _aaptDataWithNoMainActivity =
|
||||
E: category (line=43)
|
||||
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")''';
|
||||
|
||||
const String _aaptDataWithNoLauncherActivity =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithNoLauncherActivity = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1")
|
||||
@@ -563,8 +563,8 @@ const String _aaptDataWithNoLauncherActivity =
|
||||
E: action (line=43)
|
||||
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")''';
|
||||
|
||||
const String _aaptDataWithLauncherAndDefaultActivity =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithLauncherAndDefaultActivity = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
N: dist=http://schemas.android.com/apk/distribution
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
@@ -601,8 +601,8 @@ const String _aaptDataWithLauncherAndDefaultActivity =
|
||||
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
|
||||
''';
|
||||
|
||||
const String _aaptDataWithDistNamespace =
|
||||
'''N: android=http://schemas.android.com/apk/res/android
|
||||
const String _aaptDataWithDistNamespace = '''
|
||||
N: android=http://schemas.android.com/apk/res/android
|
||||
N: dist=http://schemas.android.com/apk/distribution
|
||||
E: manifest (line=7)
|
||||
A: android:versionCode(0x0101021b)=(type 0x10)0x1
|
||||
|
||||
@@ -107,7 +107,8 @@ device_info=/fake/pub.dartlang.org/pub.dartlang.org/device_info-0.4.1+4/
|
||||
|
||||
final String actualURL = await creator.toolCrashIssueTemplateGitHubURL(command, errorString, exception, stackTrace, doctorText);
|
||||
final String actualBody = Uri.parse(actualURL).queryParameters['body'];
|
||||
const String expectedBody = '''## Command
|
||||
const String expectedBody = '''
|
||||
## Command
|
||||
```
|
||||
flutter test
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user