Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

Expand All @@ -28,7 +28,7 @@ jobs:

# Upload docs site: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: bin
path: bin
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x

# Add DevExpress source: https://docs.devexpress.com/GeneralInformation/117209/installation/install-devexpress-controls-using-nuget-packages/manage-packages-with-dotnet-cli
- name: Add DevExpress package source
Expand All @@ -41,7 +41,7 @@ jobs:

# Upload docs site: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: docs-site
path: docs/_site
Expand All @@ -52,11 +52,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

# Download Artifacts: https://github.com/actions/download-artifact
- name: Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: docs-site
path: docs/_site
Expand Down
6 changes: 3 additions & 3 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
"allOf": [
{
"properties": {
"ArtifactPath": {
"type": "string"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
Expand All @@ -119,9 +122,6 @@
"DocsOutput": {
"type": "string"
},
"Output": {
"type": "string"
},
"PublishOutput": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "dosymep.SimpleServices.sln"
"Solution": "dosymep.SimpleServices.slnx"
}
17 changes: 14 additions & 3 deletions src/Directory.Build.props → Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<PropertyGroup>
<UseWpf>true</UseWpf>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<Authors>dosymep</Authors>
<Company>dosymep</Company>
<RepositoryType>Git</RepositoryType>
<Copyright>Copyright © 2023 dosymep</Copyright>
<Copyright>Copyright © 2026 dosymep</Copyright>

<Version>1.0.0</Version>
<FileVersion>1.0.0</FileVersion>
Expand All @@ -12,4 +23,4 @@
<RepositoryUrl>https://github.com/dosymep/dosymep.SimpleServices.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/dosymep/dosymep.SimpleServices</PackageProjectUrl>
</PropertyGroup>
</Project>
</Project>
3 changes: 3 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>

</Project>
36 changes: 36 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="Ninject" Version="3.3.4"/>
</ItemGroup>

<ItemGroup>
<PackageVersion Include="LibGit2Sharp" Version="0.26.2"/>
<PackageVersion Include="LibGit2Sharp.NativeBinaries" Version="2.0.306"/>
</ItemGroup>

<ItemGroup>
<PackageVersion Include="WPF-UI" Version="4.0.0"/>
<PackageVersion Include="WPF-UI.Tray" Version="4.0.0"/>
<PackageVersion Include="DevExpress.Wpf" Version="21.2.3"/>
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39"/>
<PackageVersion Include="Microsoft.WindowsAPICodePack-Shell" Version="1.1.0"/>
</ItemGroup>

<ItemGroup>
<PackageVersion Include="Nuke.Common" Version="10.1.0" />
<PackageVersion Include="Nuke.Components" Version="10.1.0" />
</ItemGroup>

<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.4"/>
<PackageVersion Include="xunit" Version="2.9.3"/>
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5"/>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Biseuv Olzhas (dosymep)
Copyright (c) 2026 Biseuv Olzhas (dosymep)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
57 changes: 31 additions & 26 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

using Nuke.Common;
using Nuke.Common.CI;
using Nuke.Common.Execution;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DocFX;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Utilities.Collections;
using Nuke.Components;

using static Nuke.Common.EnvironmentInfo;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.IO.PathConstruction;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.DocFX.DocFXTasks;

class Build : NukeBuild, IHazSolution {
class Build : NukeBuild {
/// Support plugins are available for:
/// - JetBrains ReSharper https://nuke.build/resharper
/// - JetBrains Rider https://nuke.build/rider
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Compile);
public static int Main() => Execute<Build>(x => x.DocsCompile);

[Solution] public readonly Solution Solution;

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

[Parameter] readonly AbsolutePath Output = RootDirectory / "bin";
[Parameter] readonly AbsolutePath ArtifactPath;
[Parameter] readonly AbsolutePath PublishOutput;
[Parameter] readonly string DocsOutput = Path.Combine("docs", "_site");
[Parameter] readonly string DocsConfig = Path.Combine("docs", "docfx.json");
[Parameter] readonly AbsolutePath DocsCaches = RootDirectory / Path.Combine("docs", "api");
[Parameter] readonly AbsolutePath PublishOutput;

public Build() {
ArtifactPath = RootDirectory / "bin";

AbsolutePath appdataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
PublishOutput = appdataFolder / "pyRevit" / "Extensions" / "BIM4Everyone.lib" / "dosymep_libs" / "libs";
}

Target Clean => _ => _
.Executes(() => {
Output.CreateOrCleanDirectory();
ArtifactPath.CreateOrCleanDirectory();
(RootDirectory / DocsOutput).CreateOrCleanDirectory();
DocsCaches.GlobFiles("**/*.yml").DeleteFiles();
RootDirectory.GlobDirectories("**/bin", "**/obj")
Expand All @@ -57,33 +50,38 @@ public Build() {
Target Restore => _ => _
.DependsOn(Clean)
.Executes(() => {
DotNetRestore(s => s
.SetProjectFile(((IHazSolution) this).Solution));
DotNetRestore(s => s.SetProjectFile(Solution));
});

Target Compile => _ => _
.DependsOn(Restore)
.Executes(() => {
Project[] frameworkLibs = GetFrameworkLibs();

DotNetBuild(s => s
.EnableForce()
.DisableNoRestore()
.SetConfiguration(Configuration)
.SetProjectFile(((IHazSolution) this).Solution)
.When(settings => IsServerBuild,
_ => _
.EnableContinuousIntegrationBuild())
.SetProperty("OutputPath", Output));
.CombineWith(frameworkLibs,
(s, frameworkLib) => s
.SetProjectFile(frameworkLib)
.SetProperty("OutputPath", ArtifactPath)));

});

Target Publish => _ => _
.DependsOn(Restore)
.OnlyWhenStatic(() => IsLocalBuild)
.DependsOn(Compile)
.Executes(() => {
Project[] frameworkLibs = GetFrameworkLibs();

DotNetPublish(s => s
.EnableForce()
.DisableNoRestore()
.SetConfiguration(Configuration)
.SetProperty("PublishDir", PublishOutput));
.CombineWith(frameworkLibs,
(s, frameworkLib) => s
.SetProject(frameworkLib)
.SetProperty("PublishDir", PublishOutput)));
});

Target DocsCompile => _ => _
Expand All @@ -104,4 +102,11 @@ public Build() {
// .SetProcessWorkingDirectory(RootDirectory)
// );
});

Project[] GetFrameworkLibs() {
Project[] frameworkLibs = Solution.AllProjects
.Where(item => item.Parent?.ToString()?.Equals("src") == true)
.ToArray();
return frameworkLibs;
}
}
6 changes: 3 additions & 3 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="9.0.3" />
<PackageReference Include="Nuke.Components" Version="9.0.3" />
<PackageReference Include="Nuke.Common"/>
<PackageReference Include="Nuke.Components"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{
"_appName" : "dosymep.SimpleServices",
"_appTitle" : "dosymep.SimpleServices",
"_appFooter" : "Copyright &copy; 2023 dosymep",
"_appFooter" : "Copyright &copy; 2026 dosymep",
"_enableSearch": true,
"_disableContribution": true
},
Expand Down
Loading
Loading