Skip to content

Commit

Permalink
build: housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Nov 5, 2024
1 parent b936bc9 commit 8130cdb
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 86 deletions.
File renamed without changes.
34 changes: 34 additions & 0 deletions build/SharedVersion.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<Company>MahApps</Company>
<Product>IconPacks.Avalonia</Product>
<Copyright>Copyright &#169; $([System.DateTime]::Today.ToString(yyyy)) MahApps, Jan Karger</Copyright>
<Description>IconPacks for stylish awesome Avalonia applications.</Description>
<PackageDescription>IconPacks for stylish awesome Avalonia applications.</PackageDescription>

<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Version>1.0.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0.0</InformationalVersion>

<Authors>Jan Karger</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/MahApps/IconPacks.Avalonia</PackageProjectUrl>
<PackageIcon>logo_small.png</PackageIcon>
<PackageTags>Avalonia;AvaloniaUI;Windows;UI;Modern;ModernUI;Material;XAML;Library;.NET;C#;Icon</PackageTags>
<PackageReleaseNotes>https://github.com/MahApps/IconPacks.Avalonia/releases</PackageReleaseNotes>
<RepositoryUrl>https://github.com/MahApps/IconPacks.Avalonia.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup Label="PackageIcon">
<None Include="$(MSBuildThisFileDirectory)/../resources/logo_small.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions build/SignAssembly.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\IconPacks.Avalonia.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
</PropertyGroup>

</Project>
30 changes: 30 additions & 0 deletions build/SourceLink.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project>

<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>false</IncludeSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb;.xml</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR)' == 'True'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<!-- Workaround for https://github.com/dotnet/sdk/issues/11105 -->
<ItemGroup>
<SourceRoot Include="$([MSBuild]::EnsureTrailingSlash($(NuGetPackageRoot)))" Condition="'$(NuGetPackageRoot)' != ''" />
</ItemGroup>

</Project>
40 changes: 7 additions & 33 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>

<AnalysisLevel>latest</AnalysisLevel>
<LangVersion>latest</LangVersion>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>

<!--<Nullable>enable</Nullable>-->
<Nullable>disable</Nullable>

<GenerateLibraryLayout>true</GenerateLibraryLayout>

<!-- <AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio> -->
</PropertyGroup>

Expand All @@ -21,38 +25,8 @@
<DefineConstants>$(DefineConstants);AVALONIA</DefineConstants>
</PropertyGroup>

<!-- SourceLink -->
<PropertyGroup>
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>false</IncludeSymbols>
<!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Optional: Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb;.xml;.xaml</AllowedOutputExtensionsInPackageBuildOutputFolder>
<!-- https://github.com/dotnet/sourcelink/blob/master/docs/README.md#embedallsources -->
<EmbedAllSources>True</EmbedAllSources>
</PropertyGroup>

<!-- PDB-Options -->
<PropertyGroup>
<DebugSymbols>true</DebugSymbols>
<DebugType>Embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR)' == 'True'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<!-- Workaround for https://github.com/dotnet/sdk/issues/11105 -->
<SourceRoot Include="$([MSBuild]::EnsureTrailingSlash($(NuGetPackageRoot)))" Condition="'$(NuGetPackageRoot)' != ''" />
</ItemGroup>
<Import Project="..\build\SignAssembly.props" />
<Import Project="..\build\SourceLink.props" />
<Import Project="..\build\SharedVersion.props" />

</Project>
41 changes: 0 additions & 41 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,46 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- AssemblyInfo -->
<PropertyGroup>
<Company>MahApps</Company>
<Product>IconPacks.Avalonia</Product>
<Copyright>Copyright © $([System.DateTime]::Today.ToString(yyyy)) MahApps, Jan Karger</Copyright>
<Description>IconPacks for stylish awesome Avalonia applications.</Description>

<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Version>1.0.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0.0</InformationalVersion>
</PropertyGroup>

<!-- Sign assembly -->
<PropertyGroup>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\IconPacks.Avalonia.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
</PropertyGroup>

<!-- NuGet -->
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\..\resources\logo_small.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<PropertyGroup>
<Authors>Jan Karger</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/MahApps/IconPacks.Avalonia</PackageProjectUrl>
<PackageIcon>logo_small.png</PackageIcon>
<PackageTags>Avalonia;AvaloniaUI;Windows;UI;Modern;ModernUI;Material;XAML;Library;.NET;C#;Icon</PackageTags>
<PackageReleaseNotes>https://github.com/MahApps/IconPacks.Avalonia/releases</PackageReleaseNotes>
<RepositoryUrl>https://github.com/MahApps/IconPacks.Avalonia.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ItemGroup>
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)" />

<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
Expand Down
12 changes: 1 addition & 11 deletions src/IconPacks.Avalonia.Core/IconPacks.Avalonia.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);AVALONIA</DefineConstants>
<AnalysisLevel>latest</AnalysisLevel>
<LangVersion>latest</LangVersion>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<Nullable>disable</Nullable>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>IconPacks.Avalonia.Core</AssemblyName>
Expand Down
4 changes: 3 additions & 1 deletion src/IconPacks.Avalonia.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EE320BBB-E441-4C3B-9F5B-C56BF8020DF8}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
..\build\SharedVersion.props = ..\build\SharedVersion.props
..\build\SignAssembly.props = ..\build\SignAssembly.props
..\build\SourceLink.props = ..\build\SourceLink.props
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 8130cdb

Please sign in to comment.