Unverified Commit 3f1f0a81 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Add flutter build macos-framework command (#105242)

parent 975e04ba
......@@ -753,6 +753,13 @@ void checkDirectoryNotExists(String directory) {
}
}
/// Checks that the symlink exists, otherwise throws a [FileSystemException].
void checkSymlinkExists(String file) {
if (!exists(Link(file))) {
throw FileSystemException('Expected symlink to exist.', file);
}
}
/// Check that `collection` contains all entries in `values`.
void checkCollectionContains<T>(Iterable<T> values, Iterable<T> collection) {
for (final T value in values) {
......
......@@ -17,6 +17,7 @@ import 'build_bundle.dart';
import 'build_fuchsia.dart';
import 'build_ios.dart';
import 'build_ios_framework.dart';
import 'build_macos_framework.dart';
import 'build_web.dart';
class BuildCommand extends FlutterCommand {
......@@ -29,6 +30,10 @@ class BuildCommand extends FlutterCommand {
buildSystem: globals.buildSystem,
verboseHelp: verboseHelp,
));
_addSubcommand(BuildMacOSFrameworkCommand(
buildSystem: globals.buildSystem,
verboseHelp: verboseHelp,
));
_addSubcommand(BuildIOSArchiveCommand(verboseHelp: verboseHelp));
_addSubcommand(BuildBundleCommand(verboseHelp: verboseHelp));
_addSubcommand(BuildWebCommand(verboseHelp: verboseHelp));
......
......@@ -518,6 +518,8 @@ class MacOSProject extends XcodeBasedProject {
@override
File get generatedXcodePropertiesFile => ephemeralDirectory.childFile('Flutter-Generated.xcconfig');
File get pluginRegistrantImplementation => managedDirectory.childFile('GeneratedPluginRegistrant.swift');
@override
File xcodeConfigFor(String mode) => managedDirectory.childFile('Flutter-$mode.xcconfig');
......
......@@ -251,7 +251,7 @@ void main() {
final FlutterProject project = await someProject();
project.macos.managedDirectory.createSync(recursive: true);
await project.regeneratePlatformSpecificTooling();
expectExists(project.macos.managedDirectory.childFile('GeneratedPluginRegistrant.swift'));
expectExists(project.macos.pluginRegistrantImplementation);
}, overrides: <Type, Generator>{
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment