Skip to content

Commit

Permalink
Use Java 11 in Azure Pipelines (needed for SonarCloud) (#544)
Browse files Browse the repository at this point in the history
* Install Java 11

* jdkSourceOption: 'PreInstalled'

* nuget

* 1.12.3
  • Loading branch information
StefH committed Nov 28, 2020
1 parent 37d81aa commit 3829a5a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 9 additions & 1 deletion azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ steps:
dotnet tool install --global dotnet-sonarscanner
displayName: Install Tools (SonarScanner)

- task: JavaToolInstaller@0
inputs:
versionSpec: "11"
jdkArchitectureOption: x64
jdkSourceOption: 'PreInstalled'
displayName: Install Java 11


# Begin SonarScanner
# See also
# - https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools, else you get this error: `Since you just installed the .NET Core SDK, you will need to reopen the Command Prompt window before running the tool you installed.`
Expand Down Expand Up @@ -46,7 +54,7 @@ steps:

# Upload coverage to codecov.io
- script: |
%USERPROFILE%\.nuget\packages\codecov\1.10.0\tools\codecov.exe -f "./test/WireMock.Net.Tests/coverage.opencover.xml" -t $(CODECOV_TOKEN)
%USERPROFILE%\.nuget\packages\codecov\1.12.3\tools\codecov.exe -f "./test/WireMock.Net.Tests/coverage.opencover.xml" -t $(CODECOV_TOKEN)
displayName: Upload coverage to codecov.io

# https://github.com/microsoft/azure-pipelines-tasks/issues/12212
Expand Down
10 changes: 5 additions & 5 deletions test/WireMock.Net.Tests/WireMock.Net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Codecov" Version="1.10.0" />
<PackageReference Include="coverlet.msbuild" Version="2.8.1">
<PackageReference Include="Codecov" Version="1.12.3" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="System.Threading" Version="4.3.0" />
<PackageReference Include="RestEase" Version="1.4.10" />
<PackageReference Include="RandomDataGenerator.Net" Version="1.0.12" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Moq" Version="4.15.2" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="NFluent" Version="2.7.0" />
<PackageReference Include="OpenCover" Version="4.7.922" />
<PackageReference Include="ReportGenerator" Version="4.6.7" />
<PackageReference Include="ReportGenerator" Version="4.8.1" />
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.12" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down

0 comments on commit 3829a5a

Please sign in to comment.