From d8d3e8cf70c7225daa554890dd36fe961ce8b5e9 Mon Sep 17 00:00:00 2001 From: Oleksii Yaremenko Date: Fri, 7 Apr 2023 17:08:05 +0200 Subject: [PATCH] fix: compatibility fixes & view models classes refactoring --- .../BuildProcessing/IncrementBuildNumber.cs | 5 +- .../BuildPipeline/Core/BuildProcessor.cs | 2 +- .../Core/DefaultBuildTasksProvider.cs | 2 +- .../Interfaces/Main/IBuildTasksContainer.cs | 8 +-- .../Interfaces/Main/IBuildTasksProvider.cs | 2 +- .../Interfaces/Tasks/Async/IAsyncBuildTask.cs | 2 +- .../Models/BuildTasksContainer.cs | 16 ++--- .../BuildPipelineTab/BuildPipelineTab.cs | 20 +++--- .../BuildPipelineTab/BuildPipelineTab.uss | 4 +- .../BuildPipelineTab/BuildPipelineTab.uxml | 24 +++---- ... => DefaultBuildTasksViewModelProvider.cs} | 72 +++++++++---------- ...efaultBuildTasksViewModelProvider.cs.meta} | 0 .../IBuildStepsViewModelProvider.cs | 2 +- ...cs => UnityBuildTasksViewModelProvider.cs} | 6 +- ... UnityBuildTasksViewModelProvider.cs.meta} | 0 15 files changed, 84 insertions(+), 81 deletions(-) rename com.stansassets.build/BuildPipeline/ViewModels/{DefaultBuildStepsViewModelProvider.cs => DefaultBuildTasksViewModelProvider.cs} (87%) rename com.stansassets.build/BuildPipeline/ViewModels/{DefaultBuildStepsViewModelProvider.cs.meta => DefaultBuildTasksViewModelProvider.cs.meta} (100%) rename com.stansassets.build/BuildPipeline/ViewModels/{UnityBuildStepsViewModelProvider.cs => UnityBuildTasksViewModelProvider.cs} (94%) rename com.stansassets.build/BuildPipeline/ViewModels/{UnityBuildStepsViewModelProvider.cs.meta => UnityBuildTasksViewModelProvider.cs.meta} (100%) diff --git a/com.stansassets.build/BuildMetadata/Editor/BuildProcessing/IncrementBuildNumber.cs b/com.stansassets.build/BuildMetadata/Editor/BuildProcessing/IncrementBuildNumber.cs index 26b882f..89b88e7 100644 --- a/com.stansassets.build/BuildMetadata/Editor/BuildProcessing/IncrementBuildNumber.cs +++ b/com.stansassets.build/BuildMetadata/Editor/BuildProcessing/IncrementBuildNumber.cs @@ -84,7 +84,10 @@ static void SaveBuildMetadata(BuildMetadata buildMetadata, BuildTarget buildTarg var buildNumber = 0; if (versionsSheet == null) { - spreadsheet.CreateGoogleSheet(sheetName); + spreadsheet.CreateGoogleSheet(new GoogleSheet.SheetProperties + { + Title = sheetName + }); spreadsheet.AppendGoogleCell(rangeAppend, s_Headers); if (spreadsheet.SyncErrorMassage != null) { diff --git a/com.stansassets.build/BuildPipeline/Core/BuildProcessor.cs b/com.stansassets.build/BuildPipeline/Core/BuildProcessor.cs index fd14d93..5b121e3 100644 --- a/com.stansassets.build/BuildPipeline/Core/BuildProcessor.cs +++ b/com.stansassets.build/BuildPipeline/Core/BuildProcessor.cs @@ -63,7 +63,7 @@ static void RunBuildTask(IBuildContext buildContext, IBuildTask task) } } - public static IBuildTasksContainer GenerateBuildStepsContainer() + public static IBuildTasksContainer GenerateBuildTasksContainer() { var tasksProvider = CreateBuildTasksProvider(); return tasksProvider.GetBuildTasks(new UserEditorBuildSettings()); diff --git a/com.stansassets.build/BuildPipeline/Core/DefaultBuildTasksProvider.cs b/com.stansassets.build/BuildPipeline/Core/DefaultBuildTasksProvider.cs index d4df8c1..c3597ff 100644 --- a/com.stansassets.build/BuildPipeline/Core/DefaultBuildTasksProvider.cs +++ b/com.stansassets.build/BuildPipeline/Core/DefaultBuildTasksProvider.cs @@ -6,7 +6,7 @@ namespace StansAssets.Build.Pipeline { class DefaultBuildTasksProvider : IBuildTasksProvider { - public IBuildTasksContainer GetBuildSteps(IUserEditorBuildSettings buildSettings) + public IBuildTasksContainer GetBuildTasks(IUserEditorBuildSettings buildSettings) { var tasksContainer = new BuildTasksContainer(); diff --git a/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksContainer.cs b/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksContainer.cs index 28c1c53..ffdd9b3 100644 --- a/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksContainer.cs +++ b/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksContainer.cs @@ -3,22 +3,22 @@ namespace StansAssets.Build.Pipeline { /// - /// Provides build steps. + /// Provides build tasks. /// public interface IBuildTasksContainer { /// - /// Pre process build steps. Order matters. + /// Pre process build tasks. Order matters. /// IReadOnlyList PreBuildTasks { get; } /// - /// Post process build steps. Order matters. + /// Post process build tasks. Order matters. /// IReadOnlyList PostBuildTasks { get; } /// - /// Scene process build steps. Order matters. + /// Scene process build tasks. Order matters. /// IReadOnlyList ScenePostProcessTasks { get; } } diff --git a/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksProvider.cs b/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksProvider.cs index 8569115..44f4686 100644 --- a/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksProvider.cs +++ b/com.stansassets.build/BuildPipeline/Interfaces/Main/IBuildTasksProvider.cs @@ -5,6 +5,6 @@ namespace StansAssets.Build.Pipeline /// public interface IBuildTasksProvider { - IBuildTasksContainer GetBuildSteps(IUserEditorBuildSettings buildSettings); + IBuildTasksContainer GetBuildTasks(IUserEditorBuildSettings buildSettings); } } diff --git a/com.stansassets.build/BuildPipeline/Interfaces/Tasks/Async/IAsyncBuildTask.cs b/com.stansassets.build/BuildPipeline/Interfaces/Tasks/Async/IAsyncBuildTask.cs index ae85e0b..0164980 100644 --- a/com.stansassets.build/BuildPipeline/Interfaces/Tasks/Async/IAsyncBuildTask.cs +++ b/com.stansassets.build/BuildPipeline/Interfaces/Tasks/Async/IAsyncBuildTask.cs @@ -3,7 +3,7 @@ namespace StansAssets.Build.Pipeline { /// - /// Represents a single async build step. + /// Represents a single async build task. /// public interface IAsyncBuildTask : IBuildTask { diff --git a/com.stansassets.build/BuildPipeline/Models/BuildTasksContainer.cs b/com.stansassets.build/BuildPipeline/Models/BuildTasksContainer.cs index 0848d05..4df35e4 100644 --- a/com.stansassets.build/BuildPipeline/Models/BuildTasksContainer.cs +++ b/com.stansassets.build/BuildPipeline/Models/BuildTasksContainer.cs @@ -7,9 +7,9 @@ namespace StansAssets.Build.Pipeline /// public class BuildTasksContainer : IBuildTasksContainer { - readonly List m_PreBuildSteps; - readonly List m_PostBuildSteps; - readonly List m_ScenePostProcessStepsTasks; + readonly List m_PreBuildTasks; + readonly List m_PostBuildTasks; + readonly List m_ScenePostProcessTasks; public IReadOnlyList PreBuildTasks => m_PreBuildTasks; public IReadOnlyList PostBuildTasks => m_PostBuildTasks; @@ -18,9 +18,9 @@ public class BuildTasksContainer : IBuildTasksContainer public BuildTasksContainer() { - m_PreBuildSteps = new List(); - m_PostBuildSteps = new List(); - m_ScenePostProcessStepsTasks = new List(); + m_PreBuildTasks = new List(); + m_PostBuildTasks = new List(); + m_ScenePostProcessTasks = new List(); } /// @@ -33,7 +33,7 @@ public void AddPreProcessTask(IBuildTask task) } /// - /// Registers a post process build step. + /// Registers a post process build task. /// /// Task to be registered. public void AddPostProcessTask(IBuildTask task) @@ -42,7 +42,7 @@ public void AddPostProcessTask(IBuildTask task) } /// - /// Registers a post process scene step. + /// Registers a post process scene task. /// /// Task to be registered. public void AddScenePostProcessTask(IScenePostProcessTask task) diff --git a/com.stansassets.build/BuildPipeline/UserInterface/BuildPipelineTab/BuildPipelineTab.cs b/com.stansassets.build/BuildPipeline/UserInterface/BuildPipelineTab/BuildPipelineTab.cs index 62bd70f..fdb8245 100644 --- a/com.stansassets.build/BuildPipeline/UserInterface/BuildPipelineTab/BuildPipelineTab.cs +++ b/com.stansassets.build/BuildPipeline/UserInterface/BuildPipelineTab/BuildPipelineTab.cs @@ -10,9 +10,9 @@ namespace StansAssets.Build.Pipeline [UsedImplicitly] class BuildPipelineTab : BaseTab, IBuildSystemWindowTab { - const string k_PreProcessStageBaseName = "preProcessSteps"; - const string k_SceneProcessStageBaseName = "sceneProcessSteps"; - const string k_PostProcessStageBaseName = "postProcessSteps"; + const string k_PreProcessStageBaseName = "preProcessTasks"; + const string k_SceneProcessStageBaseName = "sceneProcessTasks"; + const string k_PostProcessStageBaseName = "postProcessTasks"; readonly Label m_TasksProviderName; @@ -26,19 +26,19 @@ class BuildPipelineTab : BaseTab, IBuildSystemWindowTab public BuildPipelineTab() : base($"{BuildPipelineSettings.WindowTabsPath}/{nameof(BuildPipelineTab)}/{nameof(BuildPipelineTab)}") { - m_StepsProviderName = this.Q