Skip to content

Commit 3fb4c4d

Browse files
authored
Merge pull request #67 from AppCoreNet/feat/jetbrains-sources
Added support for Jetbrains.Annotations.Sources
2 parents 7cd0107 + 92a3a12 commit 3fb4c4d

File tree

5 files changed

+56
-2
lines changed

5 files changed

+56
-2
lines changed

.github/workflows/build-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
name: artifacts
8181
path: ./artifacts
8282
- name: Push packages
83-
run: dotnet nuget push -s ${{vars.MYGET_URL}} -k ${{secrets.MYGET_API_KEY}} ./artifacts/*.nupkg
83+
run: dotnet nuget push --skip-duplicate -s ${{vars.MYGET_URL}} -k ${{secrets.MYGET_API_KEY}} ./artifacts/*.nupkg
8484

8585
deploy-release:
8686
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
@@ -103,4 +103,4 @@ jobs:
103103
name: artifacts
104104
path: ./artifacts
105105
- name: Push packages
106-
run: dotnet nuget push -s ${{vars.NUGET_URL}} -k ${{secrets.NUGET_API_KEY}} ./artifacts/*.nupkg
106+
run: dotnet nuget push --skip-duplicate -s ${{vars.NUGET_URL}} -k ${{secrets.NUGET_API_KEY}} ./artifacts/*.nupkg

AppCoreNet.Shared.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppCoreNet.Diagnostics.JetB
4848
EndProject
4949
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppCoreNet.Attributes.CompileTest", "test\AppCoreNet.Attributes.CompileTest\AppCoreNet.Attributes.CompileTest.csproj", "{018383FB-2DAF-4966-BD14-5CEB84A04D58}"
5050
EndProject
51+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppCoreNet.Diagnostics.JetBrains.Annotations.Sources.CompileTest", "test\AppCoreNet.Diagnostics.JetBrains.Annotations.Sources.CompileTest\AppCoreNet.Diagnostics.JetBrains.Annotations.Sources.CompileTest.csproj", "{26E49BBB-D15B-47AF-B46C-B4B6F4289375}"
52+
EndProject
5153
Global
5254
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5355
Debug|Any CPU = Debug|Any CPU
@@ -90,6 +92,10 @@ Global
9092
{018383FB-2DAF-4966-BD14-5CEB84A04D58}.Debug|Any CPU.Build.0 = Debug|Any CPU
9193
{018383FB-2DAF-4966-BD14-5CEB84A04D58}.Release|Any CPU.ActiveCfg = Release|Any CPU
9294
{018383FB-2DAF-4966-BD14-5CEB84A04D58}.Release|Any CPU.Build.0 = Release|Any CPU
95+
{26E49BBB-D15B-47AF-B46C-B4B6F4289375}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
96+
{26E49BBB-D15B-47AF-B46C-B4B6F4289375}.Debug|Any CPU.Build.0 = Debug|Any CPU
97+
{26E49BBB-D15B-47AF-B46C-B4B6F4289375}.Release|Any CPU.ActiveCfg = Release|Any CPU
98+
{26E49BBB-D15B-47AF-B46C-B4B6F4289375}.Release|Any CPU.Build.0 = Release|Any CPU
9399
EndGlobalSection
94100
GlobalSection(SolutionProperties) = preSolution
95101
HideSolutionNode = FALSE
@@ -107,5 +113,6 @@ Global
107113
{46E81671-864B-4A8F-B94F-A2FCB1AC0DE6} = {953534A6-E8BA-4409-BF0D-F7BF27819118}
108114
{53117AEF-4E23-48E3-BF3B-4E5398E384F9} = {953534A6-E8BA-4409-BF0D-F7BF27819118}
109115
{018383FB-2DAF-4966-BD14-5CEB84A04D58} = {953534A6-E8BA-4409-BF0D-F7BF27819118}
116+
{26E49BBB-D15B-47AF-B46C-B4B6F4289375} = {953534A6-E8BA-4409-BF0D-F7BF27819118}
110117
EndGlobalSection
111118
EndGlobal

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
<PackageVersion Include="Nullable" Version="1.3.1" />
2222
<PackageVersion Include="Polyfill" Version="8.7.3" />
2323
<PackageVersion Include="JetBrains.Annotations" Version="2025.2.0" />
24+
<PackageVersion Include="JetBrains.Annotations.Sources" Version="2025.2.0" />
2425
</ItemGroup>
2526
</Project>

src/AppCoreNet.Diagnostics.Sources/build/AppCoreNet.Diagnostics.Sources.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<PropertyGroup Condition="@(PackageDependencies->WithMetadataValue('Identity', 'JetBrains.Annotations')->Count()) != 0 and '$(AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled)' == ''">
44
<AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled>true</AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled>
55
</PropertyGroup>
6+
<PropertyGroup Condition="@(PackageDependencies->WithMetadataValue('Identity', 'JetBrains.Annotations.Sources')->Count()) != 0 and '$(AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled)' == ''">
7+
<AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled>true</AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled>
8+
</PropertyGroup>
69
<PropertyGroup Condition="'$(AppCoreNetDiagnosticsJetBrainsAnnotationsEnabled)' == 'true'">
710
<DefineConstants>$(DefineConstants);APPCORENET_JETBRAINS_ANNOTATIONS_ENABLED</DefineConstants>
811
</PropertyGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<Project>
2+
3+
<!--
4+
The SDK is imported manually to also inject the build files from AppCoreNet.Attributes.Sources
5+
like it's done when referencing via NuGet.
6+
-->
7+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
8+
<Import Project="..\..\src\AppCoreNet.Attributes.Sources\build\AppCoreNet.Attributes.Sources.props" />
9+
<Import Project="..\..\src\AppCoreNet.Diagnostics.Sources\build\AppCoreNet.Diagnostics.Sources.props" />
10+
11+
<PropertyGroup>
12+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
13+
<TargetFrameworks Condition="'$(OS)' != 'Unix'">$(TargetFrameworks);net472</TargetFrameworks>
14+
<RootNamespace>AppCoreNet.Diagnostics</RootNamespace>
15+
<DefineConstants>$(DefineConstants);APPCORENET_SHARED_SOURCES_TESTS</DefineConstants>
16+
<IsTestProject>false</IsTestProject>
17+
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
18+
</PropertyGroup>
19+
20+
<ItemGroup>
21+
<Compile
22+
LinkBase="AppCoreNet.Attributes"
23+
Include="..\..\src\AppCoreNet.Attributes.Sources\**\*.cs"
24+
Exclude="..\..\src\AppCoreNet.Attributes.Sources\obj\**\*.cs" />
25+
<Compile
26+
LinkBase="AppCoreNet.Diagnostics"
27+
Include="..\..\src\AppCoreNet.Diagnostics.Sources\**\*.cs"
28+
Exclude="..\..\src\AppCoreNet.Diagnostics.Sources\obj\**\*.cs" />
29+
</ItemGroup>
30+
31+
<ItemGroup>
32+
<PackageReference Include="JetBrains.Annotations.Sources" />
33+
</ItemGroup>
34+
35+
<!--
36+
The SDK is imported manually to also inject the build files from AppCoreNet.Attributes.Sources
37+
like it's done when referencing via NuGet.
38+
-->
39+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
40+
<Import Project="..\..\src\AppCoreNet.Attributes.Sources\build\AppCoreNet.Attributes.Sources.targets" />
41+
<Import Project="..\..\src\AppCoreNet.Diagnostics.Sources\build\AppCoreNet.Diagnostics.Sources.targets" />
42+
43+
</Project>

0 commit comments

Comments
 (0)