Skip to content

Commit

Permalink
FIX: project configuration fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jslachta committed Dec 6, 2022
1 parent 1b3768b commit f60b4ba
Show file tree
Hide file tree
Showing 8 changed files with 558 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ${{ github.workspace }}/Coverage/lcov.info
path-to-lcov: ${{ github.workspace }}/out/coverage/lcov.info
544 changes: 544 additions & 0 deletions src/CodeAnalysis.ruleset

Large diffs are not rendered by default.

21 changes: 4 additions & 17 deletions src/Configuration.targets
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="Version.targets" />

<!-- Common -->
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Platforms>AnyCPU</Platforms>
<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))</RepoRoot>
<!--<CodeAnalysisRuleSet>$(RepoRoot)\Configuration\CodeAnalysis.ruleset</CodeAnalysisRuleSet>-->
</PropertyGroup>

<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<CodeAnalysisRuleSet>$(RepoRoot)\src\CodeAnalysis.ruleset</CodeAnalysisRuleSet>
<IsPackable Condition="'$(PackageId)' != ''">true</IsPackable>
<IsPackable Condition="'$(PackageId)' == ''">false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="$(Configuration.Contains('Release'))">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<Import Project="Version.targets" />

</Project>
5 changes: 2 additions & 3 deletions src/LocaleNames.Test/LocaleNames.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Configuration.targets" />
<PropertyGroup>
<TargetFramework>net70</TargetFramework>
<IsPackable>false</IsPackable>
<CollectCoverage>true</CollectCoverage>
<ExcludeByAttribute>GeneratedCodeAttribute</ExcludeByAttribute>
<CoverletOutputFormat>lcov</CoverletOutputFormat>
<CoverletOutput>$(RepoRoot)\Coverage\lcov.info</CoverletOutput>
<CoverletOutput>$(RepoRoot)\out\coverage\lcov.info</CoverletOutput>
</PropertyGroup>
<Import Project="..\Configuration.targets" />
<ItemGroup>
<ProjectReference Include="..\LocaleNames\LocaleNames.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/LocaleNames.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PrepareLocaleData", "Prepar
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CE53DF98-DC29-4708-9737-2D6F42A76CD7}"
ProjectSection(SolutionItems) = preProject
CodeAnalysis.ruleset = CodeAnalysis.ruleset
Configuration.targets = Configuration.targets
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
Expand Down
6 changes: 4 additions & 2 deletions src/LocaleNames/LocaleNames.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Configuration.targets" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net60;net70</TargetFrameworks>
<Authors>Jiri Slachta</Authors>
<Copyright>Copyright © Jiri Slachta</Copyright>
<PackageTags>locale, translations</PackageTags>

<PackageId>LocaleNames</PackageId>

<PackageReleaseNotes>Check: https://github.com/jslachta/LocaleNames/releases </PackageReleaseNotes>
<PackageProjectUrl>https://github.com/jslachta/LocaleNames</PackageProjectUrl>
<RepositoryUrl>https://github.com/jslachta/LocaleNames</RepositoryUrl>

Expand All @@ -14,7 +16,6 @@

<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
<Description>The LocaleNames library provides language and country names translation to almost any language.</Description>
<PackageReleaseNotes>Check: https://github.com/jslachta/LocaleNames/releases </PackageReleaseNotes>

<SymbolPackageFormat>snupkg</SymbolPackageFormat>

Expand All @@ -27,6 +28,7 @@

<LangVersion>10.0</LangVersion>
</PropertyGroup>
<Import Project="..\Configuration.targets" />

<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard2.0'))">
<PackageReference Include="System.Text.Json" Version="[4.6.0,)" />
Expand Down
1 change: 0 additions & 1 deletion src/PrepareLocaleData/PrepareLocaleData.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>net7.0</TargetFramework>
<StartupObject>PrepareLocaleData.Program</StartupObject>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Version.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<PropertyGroup>
<GitTagRegex Condition="'$(GitTagRegex)' == ''">v*</GitTagRegex>
<GitInfoReportImportance>low</GitInfoReportImportance>
<PackageOutputPath>$(RepoRoot)\NuGet</PackageOutputPath>
<GitInfoReportImportance>high</GitInfoReportImportance>
<PackageOutputPath>$(RepoRoot)\out\NuGet</PackageOutputPath>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit f60b4ba

Please sign in to comment.