Skip to content

Commit

Permalink
Only surface build and analyzer from SponsorLink
Browse files Browse the repository at this point in the history
When referencing ThisAssembly, no SponsorLink APIs should be exposed to consumers.
  • Loading branch information
kzu committed Feb 11, 2023
1 parent 74b66be commit d57edc3
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ on the `ThisAssembly.Info` class.
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

<PackageReference Include="Scriban" Version="5.6.0" Pack="false" IncludeAssets="build" />
Expand Down
4 changes: 2 additions & 2 deletions src/ThisAssembly.Constants/ThisAssembly.Constants.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ C#:
</ItemGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

<PackageReference Include="Scriban" Version="5.6.0" Pack="false" IncludeAssets="build" />
Expand Down
4 changes: 2 additions & 2 deletions src/ThisAssembly.Git/ThisAssembly.Git.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/ThisAssembly.Metadata/ThisAssembly.Metadata.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ C#:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

<PackageReference Include="Scriban" Version="5.6.0" Pack="false" IncludeAssets="build" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>

Expand Down
6 changes: 5 additions & 1 deletion src/ThisAssembly.Project/SponsorLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class SponsorLinker : SponsorLink
public SponsorLinker() : base(SponsorLinkSettings.Create(
"devlooped", "ThisAssembly",
packageId: "ThisAssembly.Project",
version: typeof(SponsorLinker).Assembly.GetName().Version.ToString(2)))
version: typeof(SponsorLinker).Assembly.GetName().Version.ToString(2)
#if DEBUG
, quietDays: 0
#endif
))
{ }
}
4 changes: 2 additions & 2 deletions src/ThisAssembly.Project/ThisAssembly.Project.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ C#:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

<PackageReference Include="Scriban" Version="5.6.0" Pack="false" IncludeAssets="build" />
Expand Down
6 changes: 5 additions & 1 deletion src/ThisAssembly.Resources/SponsorLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class SponsorLinker : SponsorLink
public SponsorLinker() : base(SponsorLinkSettings.Create(
"devlooped", "ThisAssembly",
packageId: "ThisAssembly.Resources",
version: typeof(SponsorLinker).Assembly.GetName().Version.ToString(2)))
version: typeof(SponsorLinker).Assembly.GetName().Version.ToString(2)
#if DEBUG
, quietDays: 0
#endif
))
{ }
}
4 changes: 2 additions & 2 deletions src/ThisAssembly.Resources/ThisAssembly.Resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

<PackageReference Include="Scriban" Version="5.6.0" Pack="false" IncludeAssets="build" />
Expand Down
6 changes: 5 additions & 1 deletion src/ThisAssembly.Strings/SponsorLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class SponsorLinker : SponsorLink
public SponsorLinker() : base(SponsorLinkSettings.Create(
"devlooped", "ThisAssembly",
packageId: "ThisAssembly.Strings",
version: typeof(SponsorLinker).Assembly.GetName().Version.ToString(2)))
version: typeof(SponsorLinker).Assembly.GetName().Version.ToString(2)
#if DEBUG
, quietDays: 0
#endif
))
{ }
}
4 changes: 2 additions & 2 deletions src/ThisAssembly.Strings/ThisAssembly.Strings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ such as "Hello {name}".
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" PackInclude="build,analyzers" PackExclude="compile,native,runtime" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

<PackageReference Include="Scriban" Version="5.6.0" Pack="false" IncludeAssets="build" />
Expand Down
2 changes: 1 addition & 1 deletion src/ThisAssembly.Tests/ThisAssembly.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.1" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ThisAssembly/ThisAssembly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="NuGetizer" Version="0.9.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<Compile Remove="..\*.cs" />
</ItemGroup>
Expand Down

0 comments on commit d57edc3

Please sign in to comment.