Feature: Build static assets conditionally for Backoffice and Login (#17527)

* feat: conditionally install and build the 'login' and 'backoffice' targets depending on source files

* feat: remove the preconditions target, because we are now compiling a file list to check if we need to build

* feat: remove the 'clean' targets, because the project will be cleaned if any of the compiled file lists do not exist

* feat: remove the preserve.* files as they are no longer needed

* Enable default content items again

* Remove package.json from restore target inputs

* Include generated files as static assets after build

* Clean up project files

* Exclude CS0618 warning as error and fix CA2264

* Exclude CS0612 warning as error

* Suppress removal of test fixture

* Use separate property/item groups for backoffice and login project

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
This commit is contained in:
Jacob Overgaard
2024-11-19 13:29:39 +01:00
committed by GitHub
parent 0f86cad8fa
commit 07b7c26fd9
28 changed files with 422 additions and 298 deletions

View File

@@ -2,22 +2,32 @@
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<RootNamespace>Umbraco.Cms.Tests.UnitTests</RootNamespace>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<PropertyGroup>
<!-- TODO: Fix [SYSLIB0013] and [CS0618] obsolete, [CS1998] async, [SA1117] params same line, [CS0067]
unused event, [CA1822] mark members as static, [CA1416] validate platform compatibility, [IDE0028]
collection initializers, [SA1401] fields must be private, [SA1405] debug message text, [IDE0060]
remove param, [SA1405] Debug.Assert message text, [ASP0019] header append, [CS0114] inherited
member, [CS0661]/[CS0659], adjust overrides, [CS0414] unassigned field, [CS0252] confirm
reference comparison, [IDE0060] remove parameter, [IDE1006] fix naming rule violation,
[CS0612] obsolete, and remove overrides -->
<WarningsNotAsErrors>
SYSLIB0013,CS0618,CS1998,SA1117,CS0067,CA1822,CA1416,IDE0028,SA1401,SA1405
IDE0060,SA1405,ASP0019,CS0114,CS0661,CS0659,CS0414,CS0252,CS0612,IDE0060,IDE1006
</WarningsNotAsErrors>
<!--
TODO: Fix and remove overrides:
[SYSLIB0013] and [CS0618] obsolete
[CS1998] async
[SA1117] params same line
[CS0067] unused event
[CA1822] mark members as static
[CA1416] validate platform compatibility
[IDE0028] collection initializers
[SA1401] fields must be private
[SA1405] debug message text
[IDE0060] remove parameter
[ASP0019] header append
[CS0114] inherited member
[CS0661]/[CS0659] adjust overrides
[CS0414] unassigned field
[CS0252] confirm reference comparison
[CS0612] obsolete
[IDE1006] fix naming rule violation
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SYSLIB0013,CS0618,CS1998,SA1117,CS0067,CA1822,CA1416,IDE0028,SA1401,SA1405,IDE0060,ASP0019,CS0114,CS0661,CS0659,CS0414,CS0252,CS0612,IDE1006</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit3TestAdapter" />
@@ -30,8 +40,6 @@
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\PropertyEditors\NestedContentPropertyComponentTests.cs" />
<Compile Update="Umbraco.Cms.Api.Management\Services\BackOfficeExternalLoginServiceTests.ExternalLoginStatusForUserAsync.cs">
<DependentUpon>BackOfficeExternalLoginServiceTests.cs</DependentUpon>
</Compile>
@@ -39,35 +47,4 @@
<DependentUpon>BackOfficeExternalLoginServiceTests.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
</Project>