Add an ephemeral directory to Windows projects (#40194)
Moves files generated in windows/flutter/ as part of the build to an ephemeral/ subdirectory, matching the approach used on macOS (and in the future, Windows).
Adds that directory to the generated properties file to minimize hard-coding of paths in the project.
diff --git a/packages/flutter_tools/lib/src/windows/build_windows.dart b/packages/flutter_tools/lib/src/windows/build_windows.dart
index 0c51060..7f2f41f 100644
--- a/packages/flutter_tools/lib/src/windows/build_windows.dart
+++ b/packages/flutter_tools/lib/src/windows/build_windows.dart
@@ -22,6 +22,7 @@
Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {String target}) async {
final Map<String, String> environment = <String, String>{
'FLUTTER_ROOT': Cache.flutterRoot,
+ 'FLUTTER_EPHEMERAL_DIR': windowsProject.ephemeralDirectory.path,
'PROJECT_DIR': windowsProject.project.directory.path,
'TRACK_WIDGET_CREATION': (buildInfo?.trackWidgetCreation == true).toString(),
};