Update dependencies & obsoletes

This commit is contained in:
Gerald Versluis 2023-04-19 14:00:37 +02:00
Родитель 3a9c56f070
Коммит 901a4bb57b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 81501CE0693195A3
20 изменённых файлов: 45 добавлений и 17 удалений

Просмотреть файл

@ -57,13 +57,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.devices" Version="2.5.25" />
<PackageReference Include="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.23212.1" />
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.3.1.2" />
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.16" />
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.9.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Xamarin.Essentials\Xamarin.Essentials.csproj">

Просмотреть файл

@ -23,7 +23,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.devices" Version="2.5.25" />
<PackageReference Include="UnitTests.HeadlessRunner" Version="2.0.0" />

Просмотреть файл

@ -114,7 +114,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="UnitTests.HeadlessRunner" Version="2.0.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.9" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.devices" Version="2.5.25" />

Просмотреть файл

@ -77,7 +77,7 @@
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.devices" Version="2.5.25" />
<PackageReference Include="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.23212.1" />

Просмотреть файл

@ -58,8 +58,8 @@
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.3" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2578" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -61,8 +61,8 @@
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.3" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2578" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -119,8 +119,8 @@
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.3" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2578" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.9" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup>

Просмотреть файл

@ -80,8 +80,8 @@
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.3" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2578" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -15,8 +15,8 @@
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.3" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.3" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2578" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup>

Просмотреть файл

@ -26,7 +26,9 @@ namespace Xamarin.Essentials
{
var pm = Platform.AppContext.PackageManager;
var packageName = Platform.AppContext.PackageName;
#pragma warning disable CS0618 // Type or member is obsolete
using (var info = pm.GetPackageInfo(packageName, PackageInfoFlags.MetaData))
#pragma warning restore CS0618 // Type or member is obsolete
{
return info.VersionName;
}
@ -36,7 +38,9 @@ namespace Xamarin.Essentials
{
var pm = Platform.AppContext.PackageManager;
var packageName = Platform.AppContext.PackageName;
#pragma warning disable CS0618 // Type or member is obsolete
using (var info = pm.GetPackageInfo(packageName, PackageInfoFlags.MetaData))
#pragma warning restore CS0618 // Type or member is obsolete
{
#if __ANDROID_28__
return PackageInfoCompat.GetLongVersionCode(info).ToString(CultureInfo.InvariantCulture);

Просмотреть файл

@ -123,7 +123,9 @@ namespace Xamarin.Essentials
if (Platform.HasApiLevel(BuildVersionCodes.Lollipop))
{
#pragma warning disable CS0618 // Type or member is obsolete
var networks = manager.GetAllNetworks();
#pragma warning restore CS0618 // Type or member is obsolete
// some devices running 21 and 22 only use the older api.
if (networks.Length == 0 && (int)Build.VERSION.SdkInt < 23)
@ -212,9 +214,9 @@ namespace Xamarin.Essentials
var manager = Platform.ConnectivityManager;
if (Platform.HasApiLevel(BuildVersionCodes.Lollipop))
{
#pragma warning disable CS0618 // Type or member is obsolete
foreach (var network in manager.GetAllNetworks())
{
#pragma warning disable CS0618 // Type or member is obsolete
NetworkInfo info = null;
try
{

Просмотреть файл

@ -37,7 +37,9 @@ namespace Xamarin.Essentials
{
using var displayMetrics = new DisplayMetrics();
var display = GetDefaultDisplay();
#pragma warning disable CS0618 // Type or member is obsolete
display?.GetRealMetrics(displayMetrics);
#pragma warning restore CS0618 // Type or member is obsolete
return new DisplayInfo(
width: displayMetrics?.WidthPixels ?? 0,

Просмотреть файл

@ -200,8 +200,10 @@ namespace Xamarin.Essentials
else if (storageType.Equals(storageTypeAudio, StringComparison.OrdinalIgnoreCase))
contentUri = MediaStore.Audio.Media.ExternalContentUri;
#pragma warning disable CS0618 // Type or member is obsolete
if (contentUri != null && GetDataFilePath(contentUri, $"{MediaStore.MediaColumns.Id}=?", new[] { uriPath }) is string filePath)
return filePath;
#pragma warning restore CS0618 // Type or member is obsolete
}
}
@ -236,8 +238,12 @@ namespace Xamarin.Essentials
if (srcStream == null)
return null;
#pragma warning disable CS0618 // Type or member is obsolete
// resolve or generate a valid destination path
var filename = GetColumnValue(uri, MediaStore.Files.FileColumns.DisplayName) ?? Guid.NewGuid().ToString("N");
#pragma warning restore CS0618 // Type or member is obsolete
if (!Path.HasExtension(filename) && !string.IsNullOrEmpty(extension))
filename = Path.ChangeExtension(filename, extension);

Просмотреть файл

@ -18,7 +18,9 @@ namespace Xamarin.Essentials
return Task.FromResult(false);
var manager = Platform.AppContext.PackageManager;
#pragma warning disable CS0618 // Type or member is obsolete
var supportedResolvedInfos = manager.QueryIntentActivities(intent, PackageInfoFlags.MatchDefaultOnly);
#pragma warning restore CS0618 // Type or member is obsolete
return Task.FromResult(supportedResolvedInfos.Any());
}

Просмотреть файл

@ -20,7 +20,9 @@ namespace Xamarin.Essentials
public static bool IsDeclaredInManifest(string permission)
{
var context = Platform.AppContext;
#pragma warning disable CS0618 // Type or member is obsolete
var packageInfo = context.PackageManager.GetPackageInfo(context.PackageName, PackageInfoFlags.Permissions);
#pragma warning restore CS0618 // Type or member is obsolete
var requestedPermissions = packageInfo?.RequestedPermissions;
return requestedPermissions?.Any(r => r.Equals(permission, StringComparison.OrdinalIgnoreCase)) ?? false;

Просмотреть файл

@ -195,8 +195,10 @@ namespace Xamarin.Essentials
internal static ConnectivityManager ConnectivityManager =>
AppContext.GetSystemService(Context.ConnectivityService) as ConnectivityManager;
#pragma warning disable CS0618 // Type or member is obsolete
internal static Vibrator Vibrator =>
AppContext.GetSystemService(Context.VibratorService) as Vibrator;
#pragma warning restore CS0618 // Type or member is obsolete
internal static WifiManager WifiManager =>
AppContext.GetSystemService(Context.WifiService) as WifiManager;
@ -356,7 +358,9 @@ namespace Xamarin.Essentials
// read the values
launched = extras.GetBoolean(launchedExtra, false);
#pragma warning disable CS0618 // Type or member is obsolete
actualIntent = extras.GetParcelable(actualIntentExtra) as Intent;
#pragma warning restore CS0618 // Type or member is obsolete
guid = extras.GetString(guidExtra);
requestCode = extras.GetInt(requestCodeExtra, -1);

Просмотреть файл

@ -36,7 +36,9 @@ namespace Xamarin.Essentials
#endif
Course = location.HasBearing ? location.Bearing : default(double?),
Speed = location.HasSpeed ? location.Speed : default(double?),
#pragma warning disable CS0618 // Type or member is obsolete
IsFromMockProvider = Platform.HasApiLevel(global::Android.OS.BuildVersionCodes.JellyBeanMr2) ? location.IsFromMockProvider : false,
#pragma warning restore CS0618 // Type or member is obsolete
AltitudeReferenceSystem = AltitudeReferenceSystem.Ellipsoid
};

Просмотреть файл

@ -22,7 +22,9 @@ namespace Xamarin.Essentials
// read the values
launched = extras?.GetBoolean(launchedExtra, false) ?? false;
#pragma warning disable CS0618 // Type or member is obsolete
actualIntent = extras?.GetParcelable(actualIntentExtra) as Intent;
#pragma warning restore CS0618 // Type or member is obsolete
}
protected override void OnResume()

Просмотреть файл

@ -31,6 +31,7 @@
<MDocDocumentationDirectory>$(MSBuildThisFileDirectory)..\docs\en</MDocDocumentationDirectory>
<DebugType>portable</DebugType>
<Configurations>Debug;Release</Configurations>
<BuildWithMSBuildOnMono>true</BuildWithMSBuildOnMono>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<DebugSymbols>true</DebugSymbols>

Просмотреть файл

@ -46,7 +46,7 @@ stages:
windowsImage: '' # Override the 'windows-latest' default settings
windowsImageOverride: AzurePipelinesWindows2019compliant
${{ if ne(variables['System.TeamProject'], 'devdiv') }}:
windowsImage: windows-2019
windowsImage: windows-2022
areaPath: 'DevDiv\Xamarin SDK'
masterBranchName: 'main'
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: #we are shipping our product
@ -120,7 +120,7 @@ stages:
demands:
- ImageOverride -equals AzurePipelinesWindows2019compliant
${{ if ne(variables['System.TeamProject'], 'devdiv') }}:
vmImage: windows-2019
vmImage: windows-2022
steps:
- script: 'certutil -importpfx $(Build.SourcesDirectory)\DeviceTests\DeviceTests.UWP\DeviceTests.UWP_TemporaryKey.pfx'
displayName: 'Run certutil'