From 42657640b1ff06775299fb8190495ce306533ac2 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Wed, 15 Nov 2023 10:35:07 +0300 Subject: [PATCH] Support for net8 --- .azure-pipelines/ci-build.yml | 7 ++++++- .github/workflows/build-and_test.yml | 6 +++--- .github/workflows/sonarcloud.yml | 12 +++++------- CHANGELOG.md | 6 ++++++ .../Microsoft.Kiota.Serialization.Json.Tests.csproj | 2 +- src/Microsoft.Kiota.Serialization.Json.csproj | 12 +++++------- 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index f691a58..7fe4f18 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -34,6 +34,11 @@ stages: inputs: version: 6.x + - task: UseDotNet@2 + displayName: 'Use .NET 8' + inputs: + version: 8.x + - task: PoliCheck@2 displayName: 'Run PoliCheck "/src"' inputs: @@ -75,7 +80,7 @@ stages: inputs: command: test projects: '$(Build.SourcesDirectory)\Microsoft.Kiota.Serialization.Json.sln' - arguments: '--configuration $(BuildConfiguration) --no-build -f net6.0' + arguments: '--configuration $(BuildConfiguration) --no-build -f net8.0' # CredScan - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3 diff --git a/.github/workflows/build-and_test.yml b/.github/workflows/build-and_test.yml index 7f1c471..100620f 100644 --- a/.github/workflows/build-and_test.yml +++ b/.github/workflows/build-and_test.yml @@ -9,15 +9,15 @@ on: jobs: build-and-test: - runs-on: windows-latest # Temporary switch to windows till https://github.com/microsoft/vstest/issues/4549 is released in dotnet version after 7.0.400 + runs-on: ubuntu-latest env: solutionName: Microsoft.Kiota.Serialization.Json.sln steps: - uses: actions/checkout@v4 - name: Setup .NET - uses: actions/setup-dotnet@v3.0.3 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.x - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index b43a3af..290c847 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -34,14 +34,12 @@ jobs: with: distribution: 'adopt' java-version: 17 - - name: Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 5.0.x - name: Setup .NET uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x + with: # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner + dotnet-version: | + 5.x + 8.x - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis @@ -71,7 +69,7 @@ jobs: CoverletOutputFormat: 'opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682 shell: pwsh run: | - ./.sonar/scanner/dotnet-sonarscanner begin /k:"microsoft_kiota-serialization-json-dotnet" /o:"microsoft" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="Microsoft.Kiota.Serialization.Json.Tests/coverage.net6.0.opencover.xml" + ./.sonar/scanner/dotnet-sonarscanner begin /k:"microsoft_kiota-serialization-json-dotnet" /o:"microsoft" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="Microsoft.Kiota.Serialization.Json.Tests/coverage.net8.0.opencover.xml" dotnet workload restore dotnet build dotnet test Microsoft.Kiota.Serialization.Json.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e69240..6c99278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +## [1.1.2] - 2023-11-15 + +### Added + +- Added support for dotnet 8. + ## [1.1.1] - 2023-10-23 ### Changed diff --git a/Microsoft.Kiota.Serialization.Json.Tests/Microsoft.Kiota.Serialization.Json.Tests.csproj b/Microsoft.Kiota.Serialization.Json.Tests/Microsoft.Kiota.Serialization.Json.Tests.csproj index 54d2d85..dee9769 100644 --- a/Microsoft.Kiota.Serialization.Json.Tests/Microsoft.Kiota.Serialization.Json.Tests.csproj +++ b/Microsoft.Kiota.Serialization.Json.Tests/Microsoft.Kiota.Serialization.Json.Tests.csproj @@ -1,7 +1,7 @@ - net6.0;net462 + net8.0;net462 false latest Library diff --git a/src/Microsoft.Kiota.Serialization.Json.csproj b/src/Microsoft.Kiota.Serialization.Json.csproj index 5010c59..0e4e96f 100644 --- a/src/Microsoft.Kiota.Serialization.Json.csproj +++ b/src/Microsoft.Kiota.Serialization.Json.csproj @@ -14,7 +14,7 @@ https://aka.ms/kiota/docs true true - 1.1.1 + 1.1.2 true true @@ -33,17 +33,15 @@ LICENSE README.md $(NoWarn);NU5048;NETSDK1138 + + true - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - + +