private static ReturnCode RunTasks(IList <IBuildTask> tasksList, IBuildContext context) { var validationResult = BuildTasksRunner.Validate(tasksList, context); if (validationResult < ReturnCode.Success) { return(validationResult); } return(BuildTasksRunner.Run(tasksList, context)); }
public ReturnCode DryRun() { var logHandler = settings.GetBuildLogHandler(); logHandler.Apply(); var helper = settings.GetBuildHelper(); var contexts = new BuildContext(); contexts.SetContextObject(new BundleBuildParameters(helper.BuildTarget, helper.BuildTargetGroup, Application.streamingAssetsPath)); contexts.SetContextObject(new BuildInterfacesWrapper()); contexts.SetContextObject(new BuildResults()); contexts.SetContextObject(new BuildCallbacks()); ReturnCode returnCode = BuildTasksRunner.Run(DefaultBuildTasks.Create(DefaultBuildTasks.Preset.PlayerScriptsOnly), contexts); logHandler.Revert(); return(returnCode); }
public ReturnCode Run() { var logHandler = settings.GetBuildLogHandler(); logHandler.Apply(); var helper = settings.GetBuildHelper(); var assets = settings.GetBuildTaskAsset(); var contexts = new BuildContext(); foreach (var asset in assets) { contexts.SetContextObject(asset); } ReturnCode returnCode = BuildTasksRunner.Run( assets.Select(asset => asset.GetBuildTask(helper)).ToArray(), contexts); logHandler.Revert(); return(returnCode); }