Skip to content

Commit b5d9cc2

Browse files
chore: Tidy up the source generator in tests and samples (#4344)
1 parent a02f8e5 commit b5d9cc2

13 files changed

+24
-1194
lines changed

samples/Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@
1010
<PropertyGroup Condition="'$(Configuration)' == 'Release' And $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
1111
<MtouchUseLlvm>false</MtouchUseLlvm>
1212
</PropertyGroup>
13+
14+
<ItemGroup>
15+
<!-- So the source generators work for our samples... SDK users wouldn't need to do this -->
16+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\Sentry.SourceGenerators\Sentry.SourceGenerators.csproj"
17+
OutputItemType="Analyzer"
18+
ReferenceOutputAssembly="false"/>
19+
</ItemGroup>
1320
</Project>

samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<ProjectReference Include="..\..\src\Sentry.SourceGenerators\Sentry.SourceGenerators.csproj"
16-
OutputItemType="Analyzer"
17-
ReferenceOutputAssembly="false"/>
1815
<ProjectReference Include="..\..\src\Sentry\Sentry.csproj" />
1916
<Using Include="Android.App.Activity" Alias="Activity" />
2017

samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
<ItemGroup>
4545
<!-- <PackageReference Include="Sentry" Version="..." /> -->
4646
<ProjectReference Include="..\..\src\Sentry\Sentry.csproj" />
47-
<ProjectReference Include="..\..\src\Sentry.SourceGenerators\Sentry.SourceGenerators.csproj"
48-
OutputItemType="Analyzer"
49-
ReferenceOutputAssembly="false"/>
5047
</ItemGroup>
5148

5249
</Project>

samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
<ItemGroup>
4545
<!-- <PackageReference Include="Sentry" Version="..." /> -->
4646
<ProjectReference Include="..\..\src\Sentry\Sentry.csproj" />
47-
<ProjectReference Include="..\..\src\Sentry.SourceGenerators\Sentry.SourceGenerators.csproj"
48-
OutputItemType="Analyzer"
49-
ReferenceOutputAssembly="false"/>
5047
</ItemGroup>
5148

5249
</Project>

src/Sentry/CompilerServices/BuildProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static class BuildProperties
1010
/// <summary>
1111
/// The Build Variables generated from you csproj file and initialized by the Sentry Source Generated Module Initializer
1212
/// </summary>
13-
public static IReadOnlyDictionary<string, string>? Values { get; private set; }
13+
internal static IReadOnlyDictionary<string, string>? Values { get; set; }
1414

1515
/// <summary>
1616
/// This is called by a Sentry Source-Generator module initializers to help us determine things like

0 commit comments

Comments
 (0)