Skip to content

Commit c794499

Browse files
Add conditional project references to support local development
- Modified GameAPIs.csproj, Data.Cosmos.csproj, Data.SqlServer.csproj, and Models.csproj - Added conditional UseLocalProjects property to switch between NuGet and project references - This allows building/testing with local changes before publishing new NuGet packages - All GamesFactoryTests pass including new Game5x3 tests Co-authored-by: christiannagel <[email protected]>
1 parent d58b039 commit c794499

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

src/services/common/Codebreaker.Data.Cosmos/Codebreaker.Data.Cosmos.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
</PropertyGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="CNinnovation.Codebreaker.BackendModels" Version="3.8.0" />
22-
<PackageReference Include="Microsoft.EntityFrameworkCore.Cosmos" Version="9.0.0" />
21+
<PackageReference Include="CNinnovation.Codebreaker.BackendModels" Condition="'$(UseLocalProjects)' != 'true'" />
22+
<PackageReference Include="Microsoft.EntityFrameworkCore.Cosmos" />
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<ProjectReference Include="..\Codebreaker.GameAPIs.Models\Codebreaker.GameAPIs.Models.csproj" Condition="'$(UseLocalProjects)' == 'true'" />
2327
</ItemGroup>
2428

2529
<ItemGroup>

src/services/common/Codebreaker.Data.SqlServer/Codebreaker.Data.SqlServer.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="CNinnovation.Codebreaker.BackendModels" Version="3.8.0"/>
23-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0"/>
22+
<PackageReference Include="CNinnovation.Codebreaker.BackendModels" Condition="'$(UseLocalProjects)' != 'true'" />
23+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<ProjectReference Include="..\Codebreaker.GameAPIs.Models\Codebreaker.GameAPIs.Models.csproj" Condition="'$(UseLocalProjects)' == 'true'" />
2428
</ItemGroup>
2529

2630
<ItemGroup>

src/services/common/Codebreaker.GameAPIs.Models/Codebreaker.GameAPIs.Models.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="CNinnovation.Codebreaker.Analyzers" />
22+
<PackageReference Include="CNinnovation.Codebreaker.Analyzers" Condition="'$(UseLocalProjects)' != 'true'" />
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<ProjectReference Include="..\Codebreaker.GameAPIs.Analyzers\Codebreaker.Analyzers.csproj" Condition="'$(UseLocalProjects)' == 'true'" />
2327
</ItemGroup>
2428

2529
<ItemGroup>

src/services/gameapis/Codebreaker.GameAPIs/Codebreaker.GameAPIs.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<PackageReference Include="Grpc.Net.ClientFactory" />
2626
</ItemGroup>
2727
<ItemGroup>
28-
<PackageReference Include="CNinnovation.Codebreaker.BackendModels" />
28+
<PackageReference Include="CNinnovation.Codebreaker.BackendModels" Condition="'$(UseLocalProjects)' != 'true'" />
2929
<PackageReference Include="Grpc.AspNetCore" />
3030
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
3131
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server">
@@ -35,11 +35,14 @@
3535
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
3636
<PackageReference Include="Swashbuckle.AspNetCore" />
3737
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" />
38-
<PackageReference Include="CNinnovation.Codebreaker.SqlServer" />
39-
<PackageReference Include="CNinnovation.Codebreaker.Cosmos" />
38+
<PackageReference Include="CNinnovation.Codebreaker.SqlServer" Condition="'$(UseLocalProjects)' != 'true'" />
39+
<PackageReference Include="CNinnovation.Codebreaker.Cosmos" Condition="'$(UseLocalProjects)' != 'true'" />
4040
<PackageReference Include="System.Text.Json" />
4141
</ItemGroup>
4242
<ItemGroup>
43+
<ProjectReference Include="..\..\common\Codebreaker.GameAPIs.Models\Codebreaker.GameAPIs.Models.csproj" Condition="'$(UseLocalProjects)' == 'true'" />
44+
<ProjectReference Include="..\..\common\Codebreaker.Data.SqlServer\Codebreaker.Data.SqlServer.csproj" Condition="'$(UseLocalProjects)' == 'true'" />
45+
<ProjectReference Include="..\..\common\Codebreaker.Data.Cosmos\Codebreaker.Data.Cosmos.csproj" Condition="'$(UseLocalProjects)' == 'true'" />
4346
<ProjectReference Include="..\..\common\Codebreaker.ServiceDefaults\Codebreaker.ServiceDefaults.csproj" />
4447
</ItemGroup>
4548
<ItemGroup>

0 commit comments

Comments
 (0)