From 4ee94f124e5bb4694fb60b493f6c19366c9781da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 10 Apr 2025 22:20:31 +0200 Subject: [PATCH 1/6] Update build system --- AvaloniaBehaviors.sln | 22 ++++++++-------------- Directory.Build.props | 2 +- Directory.Packages.props | 23 ++++++++++++++++++++--- azure-pipelines.yml | 2 +- build/build/Build.cs | 16 ++++++++-------- samples/Directory.Packages.props | 21 --------------------- tests/Directory.Packages.props | 29 ----------------------------- 7 files changed, 38 insertions(+), 77 deletions(-) delete mode 100644 samples/Directory.Packages.props delete mode 100644 tests/Directory.Packages.props diff --git a/AvaloniaBehaviors.sln b/AvaloniaBehaviors.sln index 54bfb2a86..2b3aea7df 100644 --- a/AvaloniaBehaviors.sln +++ b/AvaloniaBehaviors.sln @@ -1,17 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28315.86 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}" - ProjectSection(SolutionItems) = preProject - tests\Directory.Packages.props = tests\Directory.Packages.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{9B9E3891-2366-4253-A952-D08BCEB71098}" - ProjectSection(SolutionItems) = preProject - samples\Directory.Packages.props = samples\Directory.Packages.props - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BehaviorsTestApplication", "samples\BehaviorsTestApplication\BehaviorsTestApplication.csproj", "{EA113F1A-D8D7-4142-9948-353270E7EBAE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Xaml.Behaviors", "src\Avalonia.Xaml.Behaviors\Avalonia.Xaml.Behaviors.csproj", "{2D9FCE6A-DF13-4037-BC33-7EDB06102A2E}" @@ -82,6 +72,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Xaml.Interactions. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xaml.Behaviors", "src\Xaml.Behaviors\Xaml.Behaviors.csproj", "{4D130812-D955-4C68-B6A6-7D25F2C5DC0A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{451F0852-450F-40B4-8378-8994461024B8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2BDB1F89-9B32-45A8-AAE2-3DC61281F9FE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -145,12 +139,9 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {EA113F1A-D8D7-4142-9948-353270E7EBAE} = {9B9E3891-2366-4253-A952-D08BCEB71098} {2D9FCE6A-DF13-4037-BC33-7EDB06102A2E} = {84224365-32B6-46AF-85A2-45640E6D7EEB} {14006EB4-66E9-4B58-BF5F-5A1983BF4621} = {84224365-32B6-46AF-85A2-45640E6D7EEB} {ED03EEAD-938F-447B-BF0B-30857AE78BFF} = {84224365-32B6-46AF-85A2-45640E6D7EEB} - {C2229490-39CA-4192-A28C-1B5EC186E027} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} - {80D2C64D-B560-475D-941F-D5F28DDB2591} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {40A43022-EBA7-4E1D-8BB0-2691E41B5622} = {2913483A-3E55-44AE-86BB-88511F372191} {721A55B7-C5B0-44E2-803A-56E291C672FE} = {2913483A-3E55-44AE-86BB-88511F372191} {0B395300-CACE-470D-81A9-69B922FB79DE} = {2913483A-3E55-44AE-86BB-88511F372191} @@ -162,6 +153,9 @@ Global {D647E09E-BBF2-4432-A4E0-80FBB921C1EE} = {84224365-32B6-46AF-85A2-45640E6D7EEB} {648FFF6A-A8F5-491C-AC1C-19FC2061D6B4} = {84224365-32B6-46AF-85A2-45640E6D7EEB} {4D130812-D955-4C68-B6A6-7D25F2C5DC0A} = {84224365-32B6-46AF-85A2-45640E6D7EEB} + {EA113F1A-D8D7-4142-9948-353270E7EBAE} = {451F0852-450F-40B4-8378-8994461024B8} + {80D2C64D-B560-475D-941F-D5F28DDB2591} = {2BDB1F89-9B32-45A8-AAE2-3DC61281F9FE} + {C2229490-39CA-4192-A28C-1B5EC186E027} = {2BDB1F89-9B32-45A8-AAE2-3DC61281F9FE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E64CD420-15B1-487C-9806-41EBE6DC15A4} diff --git a/Directory.Build.props b/Directory.Build.props index ae547591c..13c6c0a0c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@  - 11.3.0 + 11.2.6 beta1 Wiesław Šoltés Wiesław Šoltés diff --git a/Directory.Packages.props b/Directory.Packages.props index ca3a1108e..191415e8f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,7 +1,7 @@  true - 11.3.0-beta1 + 11.2.6 @@ -11,11 +11,28 @@ + + - - + + + + + + + + + + + + + + + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6a724444b..542236e31 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ resources: endpoint: wieslawsoltes type: github name: wieslawsoltes/BuildTemplates - ref: refs/tags/v2.0.0 + ref: refs/tags/v2.9.1 variables: BuildConfiguration: 'Release' diff --git a/build/build/Build.cs b/build/build/Build.cs index b89d87565..8ca11dd13 100644 --- a/build/build/Build.cs +++ b/build/build/Build.cs @@ -1,11 +1,10 @@ using System.Collections.Generic; +using System.Linq; using Nuke.Common; using Nuke.Common.Git; using Nuke.Common.ProjectModel; using Nuke.Common.Tools.DotNet; using Nuke.Common.IO; -using static Nuke.Common.IO.FileSystemTasks; -using static Nuke.Common.IO.PathConstruction; using static Nuke.Common.Tools.DotNet.DotNetTasks; class Build : NukeBuild @@ -48,20 +47,21 @@ protected override void OnBuildInitialized() VersionSuffix = VersionSuffix ?? ""; } - private void DeleteDirectories(IReadOnlyCollection directories) + private void DeleteDirectories(IReadOnlyCollection directories) { foreach (var directory in directories) { - DeleteDirectory(directory); + directory.DeleteDirectory(); } } Target Clean => _ => _ .Executes(() => { - DeleteDirectories(GlobDirectories(SourceDirectory, "**/bin", "**/obj")); - DeleteDirectories(GlobDirectories(TestsDirectory, "**/bin", "**/obj")); - EnsureCleanDirectory(ArtifactsDirectory); + + DeleteDirectories(SourceDirectory.GlobDirectories("**/bin", "**/obj")); + DeleteDirectories(TestsDirectory.GlobDirectories("**/bin", "**/obj")); + ArtifactsDirectory.CreateOrCleanDirectory(); }); Target Restore => _ => _ @@ -117,7 +117,7 @@ private void DeleteDirectories(IReadOnlyCollection directories) .Executes(() => { DotNetPublish(s => s - .SetProject(Solution.GetProject(PublishProject)) + .SetProject( Solution.AllProjects.FirstOrDefault(x => x.Name == PublishProject)) .SetConfiguration(Configuration) .SetVersionSuffix(VersionSuffix) .SetFramework(PublishFramework) diff --git a/samples/Directory.Packages.props b/samples/Directory.Packages.props deleted file mode 100644 index 3b2c5bf5b..000000000 --- a/samples/Directory.Packages.props +++ /dev/null @@ -1,21 +0,0 @@ - - - true - 11.3.0-beta1 - - - - - - - - - - - - - - - - - diff --git a/tests/Directory.Packages.props b/tests/Directory.Packages.props deleted file mode 100644 index 8433e2584..000000000 --- a/tests/Directory.Packages.props +++ /dev/null @@ -1,29 +0,0 @@ - - - true - 11.3.0-beta1 - - - - - - - - - - - - - - - - - - - - - - - - - From 16ebe11baf8921d94792236f0498ad3961faf826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 10 Apr 2025 22:22:57 +0200 Subject: [PATCH 2/6] Update Directory.Build.props --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 13c6c0a0c..00992c577 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@  11.2.6 - beta1 + Wiesław Šoltés Wiesław Šoltés Copyright © Wiesław Šoltés 2025 From e1784b86eb6b38d35394e08196ab43486bb1472d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 10 Apr 2025 22:23:01 +0200 Subject: [PATCH 3/6] Update Directory.Packages.props --- Directory.Packages.props | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 191415e8f..2ab68be07 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -20,19 +20,20 @@ - - + + - - - - - - - + + + + + + + + - + From 28b1486a6f9d18bf36c13c31a559d020a7a21bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 10 Apr 2025 22:26:53 +0200 Subject: [PATCH 4/6] Update Directory.Packages.props --- Directory.Packages.props | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 2ab68be07..4e329de70 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,10 +13,7 @@ - - - @@ -30,10 +27,8 @@ - - - + \ No newline at end of file From 8788b22ff6a42aab5deef6771e499c36b952a2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 10 Apr 2025 22:33:50 +0200 Subject: [PATCH 5/6] Update azure-pipelines.yml --- azure-pipelines.yml | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 542236e31..d8f30557b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,29 +46,29 @@ jobs: vmImage: 'windows-2022' BuildConfiguration: ${{ variables.BuildConfiguration }} - - template: Publish-PowerShell.yml@templates - parameters: - name: 'Publish_Windows' - vmImage: 'windows-2022' - BuildConfiguration: ${{ variables.BuildConfiguration }} - PublishFramework: ${{ variables.PublishFramework }} - PublishProject: ${{ variables.PublishProject }} - PublishRuntime: 'win-x64' +# - template: Publish-PowerShell.yml@templates +# parameters: +# name: 'Publish_Windows' +# vmImage: 'windows-2022' +# BuildConfiguration: ${{ variables.BuildConfiguration }} +# PublishFramework: ${{ variables.PublishFramework }} +# PublishProject: ${{ variables.PublishProject }} +# PublishRuntime: 'win-x64' - - template: Publish-Bash.yml@templates - parameters: - name: 'Publish_Linux' - vmImage: 'ubuntu-22.04' - BuildConfiguration: ${{ variables.BuildConfiguration }} - PublishFramework: ${{ variables.PublishFramework }} - PublishProject: ${{ variables.PublishProject }} - PublishRuntime: 'linux-x64' +# - template: Publish-Bash.yml@templates +# parameters: +# name: 'Publish_Linux' +# vmImage: 'ubuntu-22.04' +# BuildConfiguration: ${{ variables.BuildConfiguration }} +# PublishFramework: ${{ variables.PublishFramework }} +# PublishProject: ${{ variables.PublishProject }} +# PublishRuntime: 'linux-x64' - - template: Publish-Bash.yml@templates - parameters: - name: 'Publish_macOS_x64' - vmImage: 'macOS-14' - BuildConfiguration: ${{ variables.BuildConfiguration }} - PublishFramework: ${{ variables.PublishFramework }} - PublishProject: ${{ variables.PublishProject }} - PublishRuntime: 'osx-x64' +# - template: Publish-Bash.yml@templates +# parameters: +# name: 'Publish_macOS_x64' +# vmImage: 'macOS-14' +# BuildConfiguration: ${{ variables.BuildConfiguration }} +# PublishFramework: ${{ variables.PublishFramework }} +# PublishProject: ${{ variables.PublishProject }} +# PublishRuntime: 'osx-x64' From 65e06e8b6c0e6e2b3634e12a471a711327b6f70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 10 Apr 2025 22:38:54 +0200 Subject: [PATCH 6/6] Update Interaction.cs --- src/Avalonia.Xaml.Interactivity/Interaction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Xaml.Interactivity/Interaction.cs b/src/Avalonia.Xaml.Interactivity/Interaction.cs index 2930dff28..b587b1a2c 100644 --- a/src/Avalonia.Xaml.Interactivity/Interaction.cs +++ b/src/Avalonia.Xaml.Interactivity/Interaction.cs @@ -474,7 +474,7 @@ private static void StyledElement_ActualThemeVariantChanged_FromChangedEvent(obj // TopLevel Opened - private static void TopLevel_Opened_FromGetter(object sender, EventArgs e) + private static void TopLevel_Opened_FromGetter(object? sender, EventArgs e) { if (sender is not AvaloniaObject d) { @@ -486,7 +486,7 @@ private static void TopLevel_Opened_FromGetter(object sender, EventArgs e) GetBehaviors(d).AttachedToLogicalTree(); } - private static void TopLevel_Opened_FromChangedEvent(object sender, EventArgs e) + private static void TopLevel_Opened_FromChangedEvent(object? sender, EventArgs e) { if (sender is not AvaloniaObject d) {