Skip to content

Commit aed9269

Browse files
committed
refactor: package configuration
1 parent a28e04b commit aed9269

File tree

9 files changed

+95
-33
lines changed

9 files changed

+95
-33
lines changed

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 ITMO is DEV
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NuGet.config

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="local-Analyzers.MustBePartial" value="src/analyzers/SourceKit.Analyzers.MustBePartial/bin/Release"/>
5+
<add key="local-Analyzers.MustBePartial.Annotations" value="src/analyzers/SourceKit.Analyzers.MustBePartial.Annotations/bin/Release"/>
6+
</packageSources>
7+
</configuration>

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SourceKit

SourceKit.Sample/SourceKit.Sample.csproj

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<LangVersion>11</LangVersion>
66
<Nullable>enable</Nullable>
7+
<Configurations>Debug;Release;Package</Configurations>
8+
<Platforms>AnyCPU</Platforms>
79
</PropertyGroup>
810

911
<ItemGroup>
1012
<ProjectReference Include="..\src\analyzers\SourceKit.Analyzers.MustBePartial\SourceKit.Analyzers.MustBePartial.csproj"
11-
OutputItemType="Analyzer"/>
13+
OutputItemType="Analyzer"
14+
Condition="'$(Configuration)' != 'Package'"/>
1215

1316
<ProjectReference Include="..\src\SourceKit\SourceKit.csproj"
14-
OutputItemType="Analyzer"/>
17+
OutputItemType="Analyzer"
18+
Condition="'$(Configuration)' != 'Package'"/>
1519
</ItemGroup>
1620

1721
<ItemGroup>
18-
<Folder Include="Analyzers\"/>
22+
<PackageReference Include="SourceKit.Analyzers.MustBePartial"
23+
Version="1.0.0"
24+
Condition="'$(Configuration)' == 'Package'"/>
1925
</ItemGroup>
2026

21-
2227
</Project>

SourceKit.Tests/SourceKit.Tests.csproj

+16-16
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Ben.Demystifier" />
12-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" />
13-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" />
14-
<PackageReference Include="Sigil" />
15-
<PackageReference Include="FluentAssertions" />
16-
<PackageReference Include="Microsoft.CodeAnalysis.Common" />
17-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
18-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" VersionOverride="4.5.0" />
19-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" />
20-
<PackageReference Include="Microsoft.NET.Test.Sdk" />
21-
<PackageReference Include="xunit" />
22-
<PackageReference Include="Xunit.DependencyInjection.Demystifier" />
11+
<PackageReference Include="Ben.Demystifier"/>
12+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit"/>
13+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit"/>
14+
<PackageReference Include="Sigil"/>
15+
<PackageReference Include="FluentAssertions"/>
16+
<PackageReference Include="Microsoft.CodeAnalysis.Common"/>
17+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces"/>
18+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" VersionOverride="4.5.0"/>
19+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common"/>
20+
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
21+
<PackageReference Include="xunit"/>
22+
<PackageReference Include="Xunit.DependencyInjection.Demystifier"/>
2323

2424
<PackageReference Include="xunit.runner.visualstudio">
2525
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -34,13 +34,13 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<ProjectReference Include="..\SourceKit.Sample\SourceKit.Sample.csproj" />
38-
<ProjectReference Include="..\src\analyzers\SourceKit.Analyzers.MustBePartial\SourceKit.Analyzers.MustBePartial.csproj" />
39-
<ProjectReference Include="..\src\SourceKit.Reflect\SourceKit.Reflect.csproj" />
37+
<ProjectReference Include="..\SourceKit.Sample\SourceKit.Sample.csproj"/>
38+
<ProjectReference Include="..\src\SourceKit.Reflect\SourceKit.Reflect.csproj"/>
39+
<ProjectReference Include="..\src\analyzers\SourceKit.Analyzers.MustBePartial\SourceKit.Analyzers.MustBePartial.csproj"/>
4040
</ItemGroup>
4141

4242
<ItemGroup>
43-
<Content Include="..\SourceKit.Sample\**\*.cs" Exclude="..\SourceKit.Sample\obj\**\*.*" LinkBase="SourceKit.Sample\" CopyToOutputDirectory="Always" />
43+
<Content Include="..\SourceKit.Sample\**\*.cs" Exclude="..\SourceKit.Sample\obj\**\*.*" LinkBase="SourceKit.Sample\" CopyToOutputDirectory="Always"/>
4444
</ItemGroup>
4545

4646
</Project>

SourceKit.sln

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Global
4141
{8EED1912-BB7A-4C97-9032-08E3219724DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
4242
{8EED1912-BB7A-4C97-9032-08E3219724DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
4343
{8EED1912-BB7A-4C97-9032-08E3219724DE}.Release|Any CPU.Build.0 = Release|Any CPU
44-
{701CE759-EAF3-439D-91BF-C158F5860B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45-
{701CE759-EAF3-439D-91BF-C158F5860B72}.Debug|Any CPU.Build.0 = Debug|Any CPU
4644
{701CE759-EAF3-439D-91BF-C158F5860B72}.Release|Any CPU.ActiveCfg = Release|Any CPU
4745
{701CE759-EAF3-439D-91BF-C158F5860B72}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{701CE759-EAF3-439D-91BF-C158F5860B72}.Debug|Any CPU.ActiveCfg = Package|Any CPU
47+
{701CE759-EAF3-439D-91BF-C158F5860B72}.Debug|Any CPU.Build.0 = Package|Any CPU
4848
{EE7B76B2-A19F-4F9D-B091-9E6EF9151164}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4949
{EE7B76B2-A19F-4F9D-B091-9E6EF9151164}.Debug|Any CPU.Build.0 = Debug|Any CPU
5050
{EE7B76B2-A19F-4F9D-B091-9E6EF9151164}.Release|Any CPU.ActiveCfg = Release|Any CPU

contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ And separate group for more volatile properties
3434
```xml
3535

3636
<PropertyGroup>
37-
<Description>Analyzers for checking whether type is partial</Description>
37+
<PackageReleaseNotes>Analyzers for checking whether type is partial</PackageReleaseNotes>
3838
</PropertyGroup>
3939
```
4040

src/analyzers/SourceKit.Analyzers.MustBePartial.Annotations/SourceKit.Analyzers.MustBePartial.Annotations.csproj

+17-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@
1010
<PropertyGroup>
1111
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1212
</PropertyGroup>
13-
13+
1414
<PropertyGroup>
1515
<PackageId>SourceKit.Analyzers.MustBePartial.Annotations</PackageId>
1616
<Title>SourceKit.Analyzers.MustBePartial.Annotations</Title>
1717
<Authors>ronimizy</Authors>
18+
<Description>Annotations for SourceKit.Analyzers.MustBePartial</Description>
19+
<PackageProjectUrl>https://github.com/itmo-is-dev/SourceKit</PackageProjectUrl>
20+
<RepositoryUrl>https://github.com/itmo-is-dev/SourceKit</RepositoryUrl>
21+
<RepositoryType>git</RepositoryType>
22+
<PackageReadmeFile>README.md</PackageReadmeFile>
23+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
24+
</PropertyGroup>
25+
26+
<PropertyGroup>
27+
<Version>1.0.0</Version>
28+
<PackageReleaseNotes>Added DerivativesMustBePartial analyzer</PackageReleaseNotes>
1829
</PropertyGroup>
1930

31+
<ItemGroup>
32+
<None Include="..\..\..\README.md" Pack="true" PackagePath="\"/>
33+
<None Include="..\..\..\LICENSE.md" Pack="true" PackagePath="\"/>
34+
</ItemGroup>
35+
2036
</Project>

src/analyzers/SourceKit.Analyzers.MustBePartial/SourceKit.Analyzers.MustBePartial.csproj

+21-9
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,39 @@
1616
<PackageId>SourceKit.Analyzers.MustBePartial</PackageId>
1717
<Title>SourceKit.Analyzers.MustBePartial</Title>
1818
<Authors>ronimizy</Authors>
19+
<Description>Analyzers for checking whether type is partial</Description>
20+
<PackageProjectUrl>https://github.com/itmo-is-dev/SourceKit</PackageProjectUrl>
21+
<RepositoryUrl>https://github.com/itmo-is-dev/SourceKit</RepositoryUrl>
22+
<RepositoryType>git</RepositoryType>
23+
<PackageReadmeFile>README.md</PackageReadmeFile>
24+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
1925
</PropertyGroup>
2026

2127
<PropertyGroup>
22-
<Description>Analyzers for checking whether type is partial</Description>
28+
<Version>1.0.0</Version>
29+
<PackageReleaseNotes>Added DerivativesMustBePartial analyzer</PackageReleaseNotes>
2330
</PropertyGroup>
2431

2532
<ItemGroup>
26-
<ProjectReference Include="..\..\SourceKit\SourceKit.csproj" PrivateAssets="all"/>
27-
<ProjectReference Include="..\SourceKit.Analyzers.MustBePartial.Annotations\SourceKit.Analyzers.MustBePartial.Annotations.csproj"/>
33+
<None Include="..\..\..\README.md" Pack="true" PackagePath="\" />
34+
<None Include="..\..\..\LICENSE.md" Pack="true" PackagePath="\" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<ProjectReference Include="..\..\SourceKit\SourceKit.csproj" PrivateAssets="all" />
39+
<ProjectReference Include="..\SourceKit.Analyzers.MustBePartial.Annotations\SourceKit.Analyzers.MustBePartial.Annotations.csproj" />
2840
</ItemGroup>
2941

3042
<ItemGroup>
31-
<PackageReference Include="Microsoft.CodeAnalysis.Common" PrivateAssets="all"/>
32-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all"/>
33-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" PrivateAssets="all"/>
43+
<PackageReference Include="Microsoft.CodeAnalysis.Common" PrivateAssets="all" />
44+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
45+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" PrivateAssets="all" />
3446
</ItemGroup>
3547

3648
<ItemGroup>
37-
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false"/>
38-
<None Include="$(OutputPath)\$(AssemblyName).Annotations.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false"/>
39-
<None Include="$(OutputPath)\SourceKit.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false"/>
49+
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
50+
<None Include="$(OutputPath)\$(AssemblyName).Annotations.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
51+
<None Include="$(OutputPath)\SourceKit.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
4052
</ItemGroup>
4153

4254
</Project>

0 commit comments

Comments
 (0)