Add missing pieces for 'driver' support on macOS (#34376)
- Adds desktop projects to ApplicationPackageStore - Plumbs target overrides through the macOS build
This commit is contained in:
@@ -15,10 +15,13 @@ import '../project.dart';
|
||||
import '../usage.dart';
|
||||
import 'cocoapod_utils.dart';
|
||||
|
||||
/// Builds the macOS project through xcode build.
|
||||
// TODO(jonahwilliams): support target option.
|
||||
/// Builds the macOS project through xcodebuild.
|
||||
// TODO(jonahwilliams): refactor to share code with the existing iOS code.
|
||||
Future<void> buildMacOS(FlutterProject flutterProject, BuildInfo buildInfo) async {
|
||||
Future<void> buildMacOS({
|
||||
FlutterProject flutterProject,
|
||||
BuildInfo buildInfo,
|
||||
String targetOverride,
|
||||
}) async {
|
||||
final Directory flutterBuildDir = fs.directory(getMacOSBuildDirectory());
|
||||
if (!flutterBuildDir.existsSync()) {
|
||||
flutterBuildDir.createSync(recursive: true);
|
||||
@@ -27,6 +30,7 @@ Future<void> buildMacOS(FlutterProject flutterProject, BuildInfo buildInfo) asyn
|
||||
await updateGeneratedXcodeProperties(
|
||||
project: flutterProject,
|
||||
buildInfo: buildInfo,
|
||||
targetOverride: targetOverride,
|
||||
useMacOSConfig: true,
|
||||
setSymroot: false,
|
||||
);
|
||||
|
||||
@@ -75,7 +75,11 @@ class MacOSDevice extends Device {
|
||||
// Stop any running applications with the same executable.
|
||||
if (!prebuiltApplication) {
|
||||
Cache.releaseLockEarly();
|
||||
await buildMacOS(FlutterProject.current(), debuggingOptions?.buildInfo);
|
||||
await buildMacOS(
|
||||
flutterProject: FlutterProject.current(),
|
||||
buildInfo: debuggingOptions?.buildInfo,
|
||||
targetOverride: mainPath,
|
||||
);
|
||||
}
|
||||
|
||||
// Ensure that the executable is locatable.
|
||||
|
||||
Reference in New Issue
Block a user