Skip to content

Commit 249a9c7

Browse files
committed
Upgrade build engine to a modular form
1 parent 91f1d7f commit 249a9c7

16 files changed

+121
-61
lines changed

Directory.Build.props

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,16 @@
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55

66
<RepoRootPath>$(MSBuildThisFileDirectory)</RepoRootPath>
7-
<RepoArtifactsPath>$(MSBuildThisFileDirectory)artifacts\</RepoArtifactsPath>
7+
<RepoArtifactsPath>$(RepoRootPath)artifacts\</RepoArtifactsPath>
8+
<RepoEnginePath>$(RepoRootPath)build\modules\</RepoEnginePath>
89

910
<BaseIntermediateOutputPath>$(RepoArtifactsPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath>
1011
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoArtifactsPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
1112
<PublishDir>$(RepoArtifactsPath)publish\$(MSBuildProjectName)\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\</PublishDir>
1213
<PackageOutputPath>$(RepoArtifactsPath)packages\$(Configuration)\</PackageOutputPath>
1314
<LogPath>$(RepoArtifactsPath)logs\</LogPath>
14-
15-
<!-- Customize as needed -->
16-
<RepositoryUrl>https://github.com/SAPTeamDEV/CommonTK</RepositoryUrl>
17-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
18-
<RepositoryType>git</RepositoryType>
19-
<Authors>Alireza Poodineh</Authors>
20-
<Company>SAP Team</Company>
21-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
22-
<Copyright>Copyright (c) SAP Team</Copyright>
23-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)CommonTK.snk</AssemblyOriginatorKeyFile>
24-
25-
<LangVersion>latest</LangVersion>
26-
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
27-
<Nullable>enable</Nullable>
28-
<ImplicitUsings>enable</ImplicitUsings>
29-
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
30-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
31-
32-
<EnableBuildServer>true</EnableBuildServer>
33-
<UseSharedCompilation>true</UseSharedCompilation>
34-
<UseMSBuildFileSystem>true</UseMSBuildFileSystem>
35-
</PropertyGroup>
36-
37-
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
38-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
39-
<RestoreLockedMode>true</RestoreLockedMode>
4015
</PropertyGroup>
4116

42-
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
43-
<SignAssembly>false</SignAssembly>
44-
<InvariantGlobalization>true</InvariantGlobalization>
45-
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
46-
</PropertyGroup>
17+
<Import Project="$(RepoEnginePath)*.common.props" />
4718

48-
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
49-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
50-
<SignAssembly>true</SignAssembly>
51-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
52-
</PropertyGroup>
53-
5419
</Project>

Directory.Packages.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
6+
<Import Project="$(RepoEnginePath)*.version.props" />
7+
</Project>

build/modules/build.common.props

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<LangVersion>latest</LangVersion>
5+
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
6+
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
9+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
10+
11+
<EnableBuildServer>true</EnableBuildServer>
12+
<UseSharedCompilation>true</UseSharedCompilation>
13+
<UseMSBuildFileSystem>true</UseMSBuildFileSystem>
14+
</PropertyGroup>
15+
16+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
17+
<SignAssembly>false</SignAssembly>
18+
<InvariantGlobalization>true</InvariantGlobalization>
19+
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
20+
</PropertyGroup>
21+
22+
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
23+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
24+
<SignAssembly>true</SignAssembly>
25+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
26+
</PropertyGroup>
27+
</Project>

build/modules/ci.common.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
4+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
5+
<RestoreLockedMode>true</RestoreLockedMode>
6+
</PropertyGroup>
7+
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<!-- Customize as needed -->
5+
<RepositoryUrl>https://github.com/SAPTeamDEV/CommonTK</RepositoryUrl>
6+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
7+
<RepositoryType>git</RepositoryType>
8+
<Authors>Alireza Poodineh</Authors>
9+
<Company>SAP Team</Company>
10+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
11+
<Copyright>Copyright (c) SAP Team</Copyright>
12+
<AssemblyOriginatorKeyFile>$(RepoRootPath)CommonTK.snk</AssemblyOriginatorKeyFile>
13+
</PropertyGroup>
14+
15+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
4+
<PackageVersion Include="System.Text.Json" Version="9.0.5" />
5+
</ItemGroup>
6+
</Project>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</PropertyGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" PrivateAssets="All" />
22-
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25" PrivateAssets="All" />
23-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
21+
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="All" />
22+
<PackageReference Include="DotNet.ReproducibleBuilds" PrivateAssets="All" />
23+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
2424
</ItemGroup>
2525
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
4+
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
5+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
6+
</ItemGroup>
7+
</Project>

build/modules/special.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<Import Project="$(RepoEnginePath)library.special.props" Condition="'$(ImportLibraryModules)'=='true'" />
4+
<Import Project="$(RepoEnginePath)unittest.special.props" Condition="'$(ImportTestModules)'=='true'" />
5+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project>
2+
<PropertyGroup>
3+
<IsPackable>false</IsPackable>
4+
<IsTestProject>true</IsTestProject>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
9+
<PackageReference Include="xunit" />
10+
<PackageReference Include="xunit.runner.visualstudio">
11+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
12+
<PrivateAssets>all</PrivateAssets>
13+
</PackageReference>
14+
<PackageReference Include="coverlet.collector">
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
<PrivateAssets>all</PrivateAssets>
17+
</PackageReference>
18+
</ItemGroup>
19+
</Project>

0 commit comments

Comments
 (0)