Skip to content

Commit 9ca13c2

Browse files
authored
Add SourceLink, embedded readme, implicit usings; refactor project properties (#416)
* Add SourceLink, embedded readme, implicit usings; refactor project properties
1 parent ae7da16 commit 9ca13c2

File tree

87 files changed

+72
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+72
-290
lines changed

Directory.Build.props

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<Authors>Deinok,Alexander Rose,graphql-dotnet</Authors>
5+
<Description>A GraphQL Client for .NET Standard</Description>
6+
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
7+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8+
<LangVersion>latest</LangVersion>
9+
<NeutralLanguage>en-US</NeutralLanguage>
10+
<NoWarn>$(NoWarn);NU5105</NoWarn> <!--TODO: fix-->
11+
<NoWarn>$(NoWarn);1591</NoWarn> <!--TODO: write comments to public APIs-->
12+
<Nullable>annotations</Nullable>
13+
<PackageIcon>logo.64x64.png</PackageIcon>
14+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
15+
<PackageProjectUrl>https://github.com/graphql-dotnet/graphql-client</PackageProjectUrl>
16+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
17+
<PackageTags>GraphQL</PackageTags>
18+
<RepositoryType>git</RepositoryType>
19+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
20+
<Deterministic>true</Deterministic>
21+
<!-- https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables -->
22+
<!-- https://github.com/clairernovotny/DeterministicBuilds -->
23+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
24+
<DebugType>embedded</DebugType>
25+
<ImplicitUsings>enable</ImplicitUsings>
26+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
27+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
28+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
29+
<WarningLevel>4</WarningLevel>
30+
<IsPackable>true</IsPackable>
31+
</PropertyGroup>
32+
33+
</Project>
Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
<Project>
22

3-
<Import Project="../root.props" />
4-
5-
<PropertyGroup>
6-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7-
<LangVersion>8.0</LangVersion>
3+
<PropertyGroup Condition="'$(IsPackable)' == 'true'">
4+
<PackageReadmeFile>README.md</PackageReadmeFile>
5+
<!--<Nullable>enable</Nullable>--> <!--TODO-->
6+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <!--TODO: remove? since generated on CI-->
87
</PropertyGroup>
98

10-
<ItemGroup>
11-
<PackageReference Update="GitVersionTask" Version="5.6.7">
12-
<PrivateAssets>all</PrivateAssets>
13-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14-
</PackageReference>
15-
</ItemGroup>
16-
17-
<PropertyGroup Condition=" '$(GitVersion_SemVer)' != ''">
9+
<PropertyGroup Condition="'$(IsPackable)' == 'true' AND '$(GitVersion_SemVer)' != ''">
1810
<GetVersion>false</GetVersion>
1911
<WriteVersionInfoToBuildLog>false</WriteVersionInfoToBuildLog>
2012
<UpdateAssemblyInfo>false</UpdateAssemblyInfo>
@@ -33,4 +25,19 @@
3325
<RepositoryCommit Condition=" '$(RepositoryCommit)' == '' ">$(GitVersion_Sha)</RepositoryCommit>
3426
</PropertyGroup>
3527

28+
<PropertyGroup Condition="'$(IsPackable)' != 'true'">
29+
<NoWarn>$(NoWarn);1591</NoWarn>
30+
</PropertyGroup>
31+
32+
<ItemGroup Condition="'$(IsPackable)' == 'true'">
33+
<None Include="..\..\assets\logo.64x64.png" Pack="true" PackagePath="\" />
34+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
35+
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="\" />
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
37+
<PackageReference Update="GitVersionTask" Version="5.6.7">
38+
<PrivateAssets>all</PrivateAssets>
39+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
40+
</PackageReference>
41+
</ItemGroup>
42+
3643
</Project>

GraphQL.Client.sln

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00
44
VisualStudioVersion = 17.1.32228.430
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{47C98B55-08F1-4428-863E-2C5C876DEEFE}"
7-
ProjectSection(SolutionItems) = preProject
8-
src\.editorconfig = src\.editorconfig
9-
src\src.props = src\src.props
10-
EndProjectSection
117
EndProject
128
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{63F75859-4698-4EDE-8B70-4ACBB8BC425A}"
139
ProjectSection(SolutionItems) = preProject
1410
.editorconfig = .editorconfig
1511
.gitignore = .gitignore
12+
Directory.Build.props = Directory.Build.props
13+
Directory.Build.targets = Directory.Build.targets
1614
dotnet-tools.json = dotnet-tools.json
1715
LICENSE.txt = LICENSE.txt
1816
examples\GraphQL.Client.Example\Program.cs = examples\GraphQL.Client.Example\Program.cs
1917
README.md = README.md
20-
root.props = root.props
18+
tests\tests.props = tests\tests.props
2119
EndProjectSection
2220
EndProject
2321
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0B0EDB0F-FF67-4B78-A8DB-B5C23E1FEE8C}"
24-
ProjectSection(SolutionItems) = preProject
25-
tests\tests.props = tests\tests.props
26-
EndProjectSection
2722
EndProject
2823
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{6326E0E2-3F48-4BAF-80D3-47AED5EB647C}"
2924
ProjectSection(SolutionItems) = preProject

GraphQL.Client.sln.DotSettings

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/GraphQL.Client.Example/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace GraphQL.Client.Example
99
{
10-
public class Program
10+
public static class Program
1111
{
1212
public static async Task Main()
1313
{

root.props

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/GraphQL.Client.Abstractions.Websocket/GraphQL.Client.Abstractions.Websocket.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Import Project="../src.props" />
4-
53
<PropertyGroup>
64
<Description>Abstractions for the Websocket transport used in GraphQL.Client</Description>
75
<TargetFramework>netstandard2.0</TargetFramework>

src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketRequest.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Threading.Tasks;
4-
51
namespace GraphQL.Client.Abstractions.Websocket
62
{
73
/// <summary>

src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketResponse.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
41
namespace GraphQL.Client.Abstractions.Websocket
52
{
63
/// <summary>

src/GraphQL.Client.Abstractions.Websocket/IGraphQLWebsocketJsonSerializer.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System.IO;
2-
using System.Threading.Tasks;
3-
41
namespace GraphQL.Client.Abstractions.Websocket
52
{
63
/// <summary>

0 commit comments

Comments
 (0)