Skip to content

Commit

Permalink
.Net6 (#112)
Browse files Browse the repository at this point in the history
* Added .NET 6 support

* fix constants

* Upgrade Android sample app to .net6.0

* Fix build warnings and update android sample

* Change baseline version

* Fix build

* Delete unused code

* Update CIBuild.yml

* Update CIBuild.yml

* Update CIBuild.yml

* Update CIBuild.yml

* Update CIBuild.yml

* Update CIBuild.yml

* Update CIBuild.yml

* Update CIBuild.yml

* Update expired certificate

* Set min versions

* Fix api build

* Fix build warnings and update doc builds

* update metadata

* tweak readme

* Use net8 for ios/android

* Fix target frameworks for sample apps

* Fix UWP build

* update tfm

* Update to v3.0 and remove out of support frameworks

* Add BT device to net6-windows

* Add MAUI sample and delete Android

* Clean up

* Update github action dependency to supported version

* Update certificate

* Update certificate

* Fix RMC FixTime parsing that can lose sub-second precision with doubles (#117)

* Extract local variables for the parameters of DateTimeOffset

* Add seconds to FixTime as Ticks in order to preserve sub-second precision that can get lost by using doubles

---------

Co-authored-by: Justin King <[email protected]>

* Cleanup of fix and add unit test to verify

---------

Co-authored-by: Morten Nielsen <[email protected]>
Co-authored-by: Justin King <[email protected]>
Co-authored-by: Justin King <[email protected]>
  • Loading branch information
4 people authored Nov 20, 2024
1 parent 91d0a73 commit db04b28
Show file tree
Hide file tree
Showing 85 changed files with 5,073 additions and 1,194 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/CIBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,31 @@ jobs:

- name: Setup Visual Studio Command Prompt
uses: microsoft/[email protected]


- name: Install Android SDK
run: |
echo y>license_accepter.txt
echo y>>license_accepter.txt
echo y>>license_accepter.txt
echo y>>license_accepter.txt
echo y>>license_accepter.txt
echo y>>license_accepter.txt
echo y>>license_accepter.txt
echo y>>license_accepter.txt
cmd /c '"%ProgramFiles(x86)%\Android\android-sdk\cmdline-tools\7.0\bin\sdkmanager.bat" --licenses < license_accepter.txt'
cmd /c '"%ProgramFiles(x86)%\Android\android-sdk\cmdline-tools\7.0\bin\sdkmanager.bat" --install "platforms;android-24"'
cmd /c '"%ProgramFiles(x86)%\Android\android-sdk\cmdline-tools\7.0\bin\sdkmanager.bat" --install "platforms;android-21"'
- name: Build
run: |
msbuild /restore /t:Build src/NmeaParser.sln /p:Configuration=Release
- name: Tests
run: |
dotnet test src/UnitTests/NmeaParser.Tests.NET/bin/Release/netcoreapp3.1/NmeaParser.Tests.Net.dll -v normal
dotnet test src/UnitTests/NmeaParser.Tests.NET/bin/Release/net6.0/NmeaParser.Tests.Net.dll -v normal
- name: Upload artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: NuGet Packages
path: artifacts/NuGet/Release
6 changes: 3 additions & 3 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v${env:DOCFXVERSION}/docfx.zip" -OutFile ".tools/docfx/docfx.zip"
[System.IO.Compression.ZipFile]::ExtractToDirectory(".tools/docfx/docfx.zip", ".tools/docfx" )
env:
DOCFXVERSION: 2.58
DOCFXVERSION: 2.59.0

- name: Install .NET OMD Generator
run: dotnet tool install --tool-path .tools/omd dotMorten.OmdGenerator --version 1.3.1
Expand All @@ -45,10 +45,10 @@ jobs:
env:
DOCFX_SOURCE_BRANCH_NAME: main
run: |
nuget install memberpage -Version 2.58.0 -OutputDirectory docs
nuget install memberpage -Version 2.59.0 -OutputDirectory docs
.tools/docfx/docfx.exe metadata docs/docfx.json
dotnet build docs/AppliesToGenerator\DocFXAppliesToGenerator.csproj
docs/AppliesToGenerator\bin\Debug\netcoreapp3.1\DocFXAppliesToGenerator.exe docs/appliesToList.json
docs/AppliesToGenerator\bin\Debug\net6.0\DocFXAppliesToGenerator.exe docs/appliesToList.json
.tools/docfx/docfx.exe build docs/docfx.json
powershell -ExecutionPolicy ByPass -command "docs\FixApiRefLinks" -Path artifacts\docs_site\api\
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,4 @@ artifacts
.tools
docs/memberpage.2.58.0
docs/AppliesToGenerator/.vs
docs/memberpage.2.59.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Nmea Parser
=========

Library for reading and parsing NMEA data message streams.
It makes it easy to connect and listen for NMEA messages coming from various devices in Windows Universal, Windows Desktop/.NET and Windows Universal apps as well as Xamarin for iOS and Android.
It makes it easy to connect and listen for NMEA messages coming from various devices in Windows Universal, Windows Desktop/.NET and Windows Universal apps as well as .NET for iOS and Android.


## Sponsoring
Expand Down
2 changes: 1 addition & 1 deletion docs/AppliesToGenerator/DocFXAppliesToGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

</Project>
11 changes: 5 additions & 6 deletions docs/BuildDoc.cmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

@ECHO OFF

SET DocFXVersion=2.58
SET DocFXVersion=2.77.0
SET DocFxFolder=%~dp0..\.tools\docfx

REM Download DocFx

IF NOT EXIST "%DocFxFolder%\v%DocFXVersion%\docfx.exe" (
MKDIR "%DocFXFolder%\v%DocFXVersion%"
powershell -ExecutionPolicy ByPass -command "Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v%DocFXVersion%/docfx.zip" -OutFile '%DocFxFolder%\docfx_v%DocFXVersion%.zip'"
powershell -ExecutionPolicy ByPass -command "Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v%DocFXVersion%/docfx-win-x64-v%DocFXVersion%.zip" -OutFile '%DocFxFolder%\docfx_v%DocFXVersion%.zip'"
powershell -ExecutionPolicy ByPass -command "Expand-Archive -LiteralPath '%DocFxFolder%\docfx_v%DocFXVersion%.zip' -DestinationPath '%DocFxFolder%\v%DocFXVersion%'"
DEL "%DocFxFolder%\docfx_v%DocFXVersion%.zip" /Q
)
Expand All @@ -16,17 +16,16 @@ IF NOT EXIST "..\.tools\nuget.exe" (
)

REM Generate OMD
dotnet tool install --tool-path %~dp0../.tools/omd dotMorten.OmdGenerator --version 1.3.1
dotnet tool install --tool-path %~dp0../.tools/omd dotMorten.OmdGenerator --version 1.4.0
mkdir %~dp0../artifacts/docs/api
%~dp0..\.tools\omd\generateomd /source=%~dp0../src/NmeaParser /output=%~dp0../artifacts/docs/api/omd.html /preprocessors=NETSTANDARD1_4;NETSTANDARD

%~dp0..\.tools\nuget install memberpage -Version 2.58.0 -OutputDirectory %~dp0
REM Build the output site (HTML) from the generated metadata and input files (uses configuration in docfx.json in this folder)
%DocFxFolder%\v%DocFXVersion%\docfx.exe metadata %~dp0\docfx.json

REM Build applies-to version/framework info
dotnet build AppliesToGenerator\DocFXAppliesToGenerator.csproj
AppliesToGenerator\bin\Debug\netcoreapp3.1\DocFXAppliesToGenerator.exe appliesToList.json
AppliesToGenerator\bin\Debug\net6.0\DocFXAppliesToGenerator.exe appliesToList.json

%DocFxFolder%\v%DocFXVersion%\docfx.exe build %~dp0\docfx.json

Expand Down
16 changes: 10 additions & 6 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

**Select your platform:**

- [.NET Standard API Reference](netstd/index.md)
- [.NET 6+ API Reference](net/index.md)

- [.NET Framework API Reference](netfx/index.md)
- [.NET 6+ Windows API Reference](netwin/index.md)

- [.NET Core API Reference](netcore/index.md)
- [.NET 8+ iOS API Reference](ios/index.md)

- [UWP API Reference](uwp/index.md)
- [.NET 8+ Android API Reference](android/index.md)

#### Legacy:

- [Android API Reference](android/index.md)
- [.NET Standard API Reference](netstd/index.md)

- [.NET Framework API Reference](netfx/index.md)

- [iOS API Reference](ios/index.md)
- [UWP API Reference](uwp/index.md)

### Object model diagrams
Click below to see the full object model diagram:
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/api/netwin/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# NMEAParser API Reference

Select an API from the menu on the left.
54 changes: 37 additions & 17 deletions docs/appliesToList.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,66 @@
"Output": "../artifacts/docs/api_overwrites/applies-to-overwrite.md",
"Metadata": [
{
"PlatformName": ".NET Standard 1.4",
"PlatformName": ".NET Standard 2.0",
"Versions" : [
{ "Name" : "GitHub", "Manifest": "../artifacts/docs/api/netstd/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/netstd/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/netstd/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/netstd/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/netstd/.manifest" },
]
},
{
"PlatformName": ".NET",
"Versions" : [
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/net/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/net/.manifest" }
]
},
{
"PlatformName": ".NET Windows",
"Versions" : [
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/netwin/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/netwin/.manifest" }
]
},
{
"PlatformName": ".NET Android",
"Versions" : [
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/android/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/android/.manifest" }
]
},
{
"PlatformName": ".NET iOS",
"Versions" : [
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/ios/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/ios/.manifest" }
]
},
{
"PlatformName": ".NET Framework",
"Versions" : [
{ "Name" : "GitHub", "Manifest": "../artifacts/docs/api/netfx/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/netfx/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/netfx/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/netfx/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/netfx/.manifest" }
]
},
{
"PlatformName": ".NET Core",
"PlatformName": "UWP",
"Versions" : [
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/netcore/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/netcore/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/netcore/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/netcore/.manifest" }
{ "Name" : "GitHub", "Manifest": "../artifacts/docs/api/uwp/.manifest" },
{ "Name" : "v3.0", "Manifest": "manifests/v3.0/uwp/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/uwp/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/uwp/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/uwp/.manifest" }
]
},
{
"PlatformName": "Xamarin.Android",
"Versions" : [
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/android/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/android/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/android/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/android/.manifest" }
Expand All @@ -40,20 +70,10 @@
{
"PlatformName": "Xamarin.iOS",
"Versions" : [
{ "Name" : "GitHub", "Manifest": "../artifacts/docs/api/ios/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/ios/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/ios/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/ios/.manifest" }
]
},
{
"PlatformName": "UWP",
"Versions" : [
{ "Name" : "GitHub", "Manifest": "../artifacts/docs/api/uwp/.manifest" },
{ "Name" : "v2.2", "Manifest": "manifests/v2.2/uwp/.manifest" },
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/uwp/.manifest" },
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/uwp/.manifest" }
]
}
]
}
Loading

0 comments on commit db04b28

Please sign in to comment.