From 2d8a7194d750bff981d3c526b28ab706da418026 Mon Sep 17 00:00:00 2001 From: Fredi Machado Date: Wed, 4 Oct 2023 23:56:37 +1100 Subject: [PATCH] Manage package versions centrally - Add target framework to Directory.Build.Props - Treat warnings as errors --- Directory.Build.props | 7 ++++- Directory.Packages.props | 28 +++++++++++++++++++ NCafe.sln | 3 +- README.md | 4 +-- .../NCafe.Admin.Api/NCafe.Admin.Api.csproj | 5 ++-- .../NCafe.Admin.Domain.Tests.csproj | 15 +++++----- .../NCafe.Admin.Domain.csproj | 5 ++-- .../NCafe.Barista.Api.csproj | 5 ++-- .../NCafe.Barista.Domain.Tests.csproj | 16 +++++------ .../NCafe.Barista.Domain.csproj | 5 ++-- .../NCafe.Cashier.Api.csproj | 5 ++-- .../NCafe.Cashier.Domain.Tests.csproj | 15 +++++----- .../NCafe.Cashier.Domain.csproj | 5 ++-- src/Common/NCafe.Core/NCafe.Core.csproj | 1 - .../NCafe.Infrastructure.csproj | 13 ++++----- src/Common/NCafe.Shared/NCafe.Shared.csproj | 1 - src/UI/NCafe.Web/NCafe.Web.csproj | 9 +++--- 17 files changed, 81 insertions(+), 61 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Build.props b/Directory.Build.props index 8d0f2b7..2207451 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,11 @@ + + net7.0 + true + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..07865f0 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,28 @@ + + + + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NCafe.sln b/NCafe.sln index 3d558e7..324fdf4 100644 --- a/NCafe.sln +++ b/NCafe.sln @@ -36,6 +36,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig .env-local = .env-local Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.props infrastructure-compose.yaml = infrastructure-compose.yaml README.md = README.md services-compose.yaml = services-compose.yaml @@ -68,7 +69,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ .github\workflows\web-ui.yml = .github\workflows\web-ui.yml EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NCafe.Shared", "src\Common\NCafe.Shared\NCafe.Shared.csproj", "{98734B27-556B-40FB-8E1F-86FDCC4DA1A1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NCafe.Shared", "src\Common\NCafe.Shared\NCafe.Shared.csproj", "{98734B27-556B-40FB-8E1F-86FDCC4DA1A1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/README.md b/README.md index 9dd9225..c8af514 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ abstractions used by other layers. This project doesn't have any microservice sp #### Shared -There is a shared project (`NCafe.Shared`), that contains code that doesn't require any core -abstraction or logic. For example, types that define SignalR object for real-time functionality. +There is a shared project (`NCafe.Shared`), that contains code that don't require any core +abstraction or logic. For example, types that define SignalR objects for real-time functionality. The Web UI project doesn't really need a reference to `NCafe.Core` (`NCafe.Shared` is enough). diff --git a/src/Admin/NCafe.Admin.Api/NCafe.Admin.Api.csproj b/src/Admin/NCafe.Admin.Api/NCafe.Admin.Api.csproj index d31513e..377579b 100644 --- a/src/Admin/NCafe.Admin.Api/NCafe.Admin.Api.csproj +++ b/src/Admin/NCafe.Admin.Api/NCafe.Admin.Api.csproj @@ -1,12 +1,11 @@ - + - net7.0 enable - + diff --git a/src/Admin/NCafe.Admin.Domain.Tests/NCafe.Admin.Domain.Tests.csproj b/src/Admin/NCafe.Admin.Domain.Tests/NCafe.Admin.Domain.Tests.csproj index 97cb069..2814925 100644 --- a/src/Admin/NCafe.Admin.Domain.Tests/NCafe.Admin.Domain.Tests.csproj +++ b/src/Admin/NCafe.Admin.Domain.Tests/NCafe.Admin.Domain.Tests.csproj @@ -1,24 +1,23 @@  - net7.0 false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Admin/NCafe.Admin.Domain/NCafe.Admin.Domain.csproj b/src/Admin/NCafe.Admin.Domain/NCafe.Admin.Domain.csproj index d441c8a..858bdf6 100644 --- a/src/Admin/NCafe.Admin.Domain/NCafe.Admin.Domain.csproj +++ b/src/Admin/NCafe.Admin.Domain/NCafe.Admin.Domain.csproj @@ -1,12 +1,11 @@ - + - net7.0 enable - + diff --git a/src/Barista/NCafe.Barista.Api/NCafe.Barista.Api.csproj b/src/Barista/NCafe.Barista.Api/NCafe.Barista.Api.csproj index aee1032..5775119 100644 --- a/src/Barista/NCafe.Barista.Api/NCafe.Barista.Api.csproj +++ b/src/Barista/NCafe.Barista.Api/NCafe.Barista.Api.csproj @@ -1,12 +1,11 @@ - + - net7.0 enable - + diff --git a/src/Barista/NCafe.Barista.Domain.Tests/NCafe.Barista.Domain.Tests.csproj b/src/Barista/NCafe.Barista.Domain.Tests/NCafe.Barista.Domain.Tests.csproj index 9cb9cdd..1800e81 100644 --- a/src/Barista/NCafe.Barista.Domain.Tests/NCafe.Barista.Domain.Tests.csproj +++ b/src/Barista/NCafe.Barista.Domain.Tests/NCafe.Barista.Domain.Tests.csproj @@ -1,25 +1,23 @@  - net7.0 - false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Barista/NCafe.Barista.Domain/NCafe.Barista.Domain.csproj b/src/Barista/NCafe.Barista.Domain/NCafe.Barista.Domain.csproj index d441c8a..858bdf6 100644 --- a/src/Barista/NCafe.Barista.Domain/NCafe.Barista.Domain.csproj +++ b/src/Barista/NCafe.Barista.Domain/NCafe.Barista.Domain.csproj @@ -1,12 +1,11 @@ - + - net7.0 enable - + diff --git a/src/Cashier/NCafe.Cashier.Api/NCafe.Cashier.Api.csproj b/src/Cashier/NCafe.Cashier.Api/NCafe.Cashier.Api.csproj index 840baa0..d799beb 100644 --- a/src/Cashier/NCafe.Cashier.Api/NCafe.Cashier.Api.csproj +++ b/src/Cashier/NCafe.Cashier.Api/NCafe.Cashier.Api.csproj @@ -1,12 +1,11 @@ - + - net7.0 enable - + diff --git a/src/Cashier/NCafe.Cashier.Domain.Tests/NCafe.Cashier.Domain.Tests.csproj b/src/Cashier/NCafe.Cashier.Domain.Tests/NCafe.Cashier.Domain.Tests.csproj index df3f254..6ec94fc 100644 --- a/src/Cashier/NCafe.Cashier.Domain.Tests/NCafe.Cashier.Domain.Tests.csproj +++ b/src/Cashier/NCafe.Cashier.Domain.Tests/NCafe.Cashier.Domain.Tests.csproj @@ -1,24 +1,23 @@  - net7.0 false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Cashier/NCafe.Cashier.Domain/NCafe.Cashier.Domain.csproj b/src/Cashier/NCafe.Cashier.Domain/NCafe.Cashier.Domain.csproj index d441c8a..858bdf6 100644 --- a/src/Cashier/NCafe.Cashier.Domain/NCafe.Cashier.Domain.csproj +++ b/src/Cashier/NCafe.Cashier.Domain/NCafe.Cashier.Domain.csproj @@ -1,12 +1,11 @@ - + - net7.0 enable - + diff --git a/src/Common/NCafe.Core/NCafe.Core.csproj b/src/Common/NCafe.Core/NCafe.Core.csproj index 4e37a1d..2363ac1 100644 --- a/src/Common/NCafe.Core/NCafe.Core.csproj +++ b/src/Common/NCafe.Core/NCafe.Core.csproj @@ -1,7 +1,6 @@ - net7.0 enable diff --git a/src/Common/NCafe.Infrastructure/NCafe.Infrastructure.csproj b/src/Common/NCafe.Infrastructure/NCafe.Infrastructure.csproj index 451e7c8..dd8280f 100644 --- a/src/Common/NCafe.Infrastructure/NCafe.Infrastructure.csproj +++ b/src/Common/NCafe.Infrastructure/NCafe.Infrastructure.csproj @@ -1,16 +1,15 @@ - + - net7.0 enable - - - - - + + + + + diff --git a/src/Common/NCafe.Shared/NCafe.Shared.csproj b/src/Common/NCafe.Shared/NCafe.Shared.csproj index 1346798..8aee994 100644 --- a/src/Common/NCafe.Shared/NCafe.Shared.csproj +++ b/src/Common/NCafe.Shared/NCafe.Shared.csproj @@ -1,7 +1,6 @@ - net7.0 enable diff --git a/src/UI/NCafe.Web/NCafe.Web.csproj b/src/UI/NCafe.Web/NCafe.Web.csproj index 20d7853..38cd37b 100644 --- a/src/UI/NCafe.Web/NCafe.Web.csproj +++ b/src/UI/NCafe.Web/NCafe.Web.csproj @@ -1,16 +1,15 @@  - net7.0 enable service-worker-assets.js - - - - + + + +