mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-01-29 11:54:40 +01:00
Fix build warnings and update doc builds
This commit is contained in:
parent
1164e20270
commit
5cecd3c129
6
.github/workflows/ghpages.yml
vendored
6
.github/workflows/ghpages.yml
vendored
|
|
@ -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
|
||||
|
|
@ -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\
|
||||
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -115,3 +115,4 @@ artifacts
|
|||
.tools
|
||||
docs/memberpage.2.58.0
|
||||
docs/AppliesToGenerator/.vs
|
||||
docs/memberpage.2.59.0
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@ECHO OFF
|
||||
|
||||
SET DocFXVersion=2.58
|
||||
SET DocFXVersion=2.59.0
|
||||
SET DocFxFolder=%~dp0..\.tools\docfx
|
||||
|
||||
REM Download DocFx
|
||||
|
|
@ -20,13 +20,14 @@ dotnet tool install --tool-path %~dp0../.tools/omd dotMorten.OmdGenerator --vers
|
|||
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
|
||||
%~dp0..\.tools\nuget install memberpage -Version %DocFXVersion% -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
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,34 @@
|
|||
{ "Name" : "v2.1", "Manifest": "manifests/v2.1/uwp/.manifest" },
|
||||
{ "Name" : "v2.0", "Manifest": "manifests/v2.0/uwp/.manifest" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"PlatformName": ".NET 6+",
|
||||
"Versions" : [
|
||||
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/net/.manifest" },
|
||||
{ "Name" : "v2.3", "Manifest": "manifests/v2.3/net/.manifest" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"PlatformName": ".NET Android",
|
||||
"Versions" : [
|
||||
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/net-android/.manifest" },
|
||||
{ "Name" : "v2.3", "Manifest": "manifests/v2.3/net-android/.manifest" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"PlatformName": ".NET iOS",
|
||||
"Versions" : [
|
||||
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/net-ios/.manifest" },
|
||||
{ "Name" : "v2.3", "Manifest": "manifests/v2.3/net-ios/.manifest" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"PlatformName": ".NET Windows",
|
||||
"Versions" : [
|
||||
{ "Name": "GitHub", "Manifest": "../artifacts/docs/api/net-windows/.manifest" },
|
||||
{ "Name" : "v2.3", "Manifest": "manifests/v2.3/net-windows/.manifest" }
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
@ -6,62 +6,84 @@
|
|||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
},
|
||||
],
|
||||
],
|
||||
"dest": "../artifacts/docs/api/netstd",
|
||||
"properties": { "TargetFramework": "netstandard1.4" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
],
|
||||
"dest": "../artifacts/docs/api/netfx",
|
||||
"properties": { "TargetFramework": "net452" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
"dest": "../artifacts/docs/api/netcore",
|
||||
"properties": { "TargetFramework": "netcoreapp2.1" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
],
|
||||
"dest": "../artifacts/docs/api/android",
|
||||
"properties": { "TargetFramework": "monoandroid70" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
],
|
||||
"dest": "../artifacts/docs/api/net-android",
|
||||
"properties": { "TargetFramework": "net7.0-android" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
"dest": "../artifacts/docs/api/ios",
|
||||
"properties": { "TargetFramework": "xamarinios10" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
],
|
||||
"dest": "../artifacts/docs/api/net-ios",
|
||||
"properties": { "TargetFramework": "net7.0-ios" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
"dest": "../artifacts/docs/api/net-windows",
|
||||
"properties": { "TargetFramework": "net6.0-windows10.0.19041.0" },
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
},
|
||||
{ "src": [
|
||||
{
|
||||
"files": [ "NmeaParser/NmeaParser.csproj" ],
|
||||
"src" : "../src/"
|
||||
}
|
||||
],
|
||||
"dest": "../artifacts/docs/api/uwp",
|
||||
"properties": { "TargetFramework": "uap10.0.18362" },
|
||||
"disableGitFeatures": false,
|
||||
|
|
@ -70,7 +92,7 @@
|
|||
],
|
||||
"build": {
|
||||
"content": [
|
||||
{
|
||||
{
|
||||
"files": [
|
||||
"api/**/index.md"
|
||||
]
|
||||
|
|
@ -80,7 +102,7 @@
|
|||
"api/**.yml",
|
||||
"api/**/toc.yml"
|
||||
],
|
||||
"src" : "../artifacts/docs"
|
||||
"src" : "../artifacts/docs"
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
|
|
@ -98,11 +120,11 @@
|
|||
"favicon.ico"
|
||||
]
|
||||
},
|
||||
{
|
||||
{
|
||||
"files": [
|
||||
"api/omd.html"
|
||||
],
|
||||
"src" : "../artifacts/docs"
|
||||
"src" : "../artifacts/docs"
|
||||
}
|
||||
],
|
||||
"overwrite": [
|
||||
|
|
@ -134,7 +156,7 @@
|
|||
"fileMetadataFiles": [],
|
||||
"template": [
|
||||
"default",
|
||||
"memberpage.2.58.0/content",
|
||||
"memberpage.2.59.0/content",
|
||||
"template_overrides"
|
||||
],
|
||||
"postProcessors": [],
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ namespace NmeaParser
|
|||
/// </summary>
|
||||
/// <returns>A set of bluetooth devices available that supports serial connections</returns>
|
||||
[Obsolete("Use GetBluetoothSerialDevices(Context)")]
|
||||
#if NETCOREAPP
|
||||
[System.Runtime.Versioning.ObsoletedOSPlatform("android31.0")]
|
||||
#endif
|
||||
public static IEnumerable<Android.Bluetooth.BluetoothDevice> GetBluetoothSerialDevices()
|
||||
{
|
||||
var adapter = Android.Bluetooth.BluetoothAdapter.DefaultAdapter;
|
||||
|
|
@ -110,7 +113,9 @@ namespace NmeaParser
|
|||
else
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete. Only used if deprecated constructor is used
|
||||
#pragma warning disable CA1422 // Validate platform compatibility
|
||||
adapter = Android.Bluetooth.BluetoothAdapter.DefaultAdapter;
|
||||
#pragma warning restore CA1422 // Validate platform compatibility
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
if (adapter?.IsEnabled != true)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<Sdk Name="Microsoft.DotNet.PackageValidation" Version="1.0.0-preview.7.21379.12" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;netstandard1.4;netcoreapp2.1;net452;monoandroid50;monoandroid70;xamarinios10;uap10.0.18362;net6.0;net7.0-ios;net7.0-android;net6.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;netstandard1.4;net452;monoandroid50;monoandroid70;xamarinios10;uap10.0.18362;net6.0;net7.0-ios;net7.0-android;net6.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
|
|
|
|||
Loading…
Reference in a new issue