Esempio n. 1
0
 /// <summary>
 /// Build the Flutter module to generate the Android Archive (AAR) and/or the iOS framework
 /// that will be embedded into Xamarin applications.
 /// </summary>
 private static void BuildFlutterModule(NewProjectSettings settings, bool verbose = false)
 {
     try
     {
         if (settings.TargetAndroid)
         {
             FlutterTools.BuildAndroidArchive(settings.FlutterModulePath, FlutterModuleBuildConfig.Debug | FlutterModuleBuildConfig.Release, verbose);
         }
         if (settings.TargetIos && OperatingSystem.IsMacOS())
         {
             FlutterTools.BuildIosFramework(settings.FlutterModulePath, FlutterModuleBuildConfig.Debug | FlutterModuleBuildConfig.Release, verbose);
         }
     }
     catch (Exception e)
     {
         throw new CommandLineException(CommandLineErrorCode.NewProject_BuildFlutterModuleFailed, e);
     }
 }