Update dependencies & obsoletes
This commit is contained in:
Родитель
3a9c56f070
Коммит
901a4bb57b
|
@ -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'
|
||||
|
|
Загрузка…
Ссылка в новой задаче