Skip to content

Commit

Permalink
Update .NET 6 (#1740)
Browse files Browse the repository at this point in the history
* Update .NET 6 to Preview 6
  • Loading branch information
mattleibow authored Jul 12, 2021
1 parent 2403baa commit 73ac5d0
Show file tree
Hide file tree
Showing 73 changed files with 1,594 additions and 237 deletions.
5 changes: 1 addition & 4 deletions VERSIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Uno.UI release 3.7.6
Microsoft.ProjectReunion release 0.8.0
Microsoft.ProjectReunion.Foundation release 0.8.0
Microsoft.ProjectReunion.WinUI release 0.8.0
Microsoft.Maui.Core release 6.0.100-preview.5.794
Microsoft.Maui.Controls release 6.0.100-preview.5.794
Microsoft.Maui.Controls.Compatibility release 6.0.100-preview.5.794
Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup release 6.0.100-preview.5.794
Microsoft.Maui.Graphics release 6.0.100-preview.5.246
Microsoft.Windows.SDK.NET.Ref release 10.0.18362.15

# additional references used by the tooling
Expand Down
19 changes: 0 additions & 19 deletions binding/HarfBuzzSharp/nuget/build/android/HarfBuzzSharp.targets
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- temporarily work around https://github.com/xamarin/xamarin-android/issues/5432 -->
<Target Name="_HarfBuzzSharpIncludeNativeSystemLibrariesFixes" BeforeTargets="_IncludeNativeSystemLibraries">
<ItemGroup>
<_FixedResolvedFileToPublish
Include="@(ResolvedFileToPublish)"
Condition="
'%(ResolvedFileToPublish.AssetType)' == 'native' and
'%(ResolvedFileToPublish.Filename)' == 'libHarfBuzzSharp' and
'%(ResolvedFileToPublish.Extension)' == '.so' and
'%(ResolvedFileToPublish.NuGetPackageId)' != '' and
'%(ResolvedFileToPublish.RuntimeIdentifier)' == '' and
'%(ResolvedFileToPublish.PathInPackage)' != '' " />
<ResolvedFileToPublish Update="@(_FixedResolvedFileToPublish)">
<RuntimeIdentifier>$([System.Text.RegularExpressions.Regex]::Match('%(_FixedResolvedFileToPublish.PathInPackage)', 'runtimes/([^/]+)/native/.*').Groups[1].Value)</RuntimeIdentifier>
</ResolvedFileToPublish>
<_FixedResolvedFileToPublish Remove="@(_FixedResolvedFileToPublish)" />
</ItemGroup>
</Target>

</Project>
19 changes: 0 additions & 19 deletions binding/SkiaSharp/nuget/build/android/SkiaSharp.targets
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- temporarily work around https://github.com/xamarin/xamarin-android/issues/5432 -->
<Target Name="_SkiaSharpIncludeNativeSystemLibrariesFixes" BeforeTargets="_IncludeNativeSystemLibraries">
<ItemGroup>
<_FixedResolvedFileToPublish
Include="@(ResolvedFileToPublish)"
Condition="
'%(ResolvedFileToPublish.AssetType)' == 'native' and
'%(ResolvedFileToPublish.Filename)' == 'libSkiaSharp' and
'%(ResolvedFileToPublish.Extension)' == '.so' and
'%(ResolvedFileToPublish.NuGetPackageId)' != '' and
'%(ResolvedFileToPublish.RuntimeIdentifier)' == '' and
'%(ResolvedFileToPublish.PathInPackage)' != '' " />
<ResolvedFileToPublish Update="@(_FixedResolvedFileToPublish)">
<RuntimeIdentifier>$([System.Text.RegularExpressions.Regex]::Match('%(_FixedResolvedFileToPublish.PathInPackage)', 'runtimes/([^/]+)/native/.*').Groups[1].Value)</RuntimeIdentifier>
</ResolvedFileToPublish>
<_FixedResolvedFileToPublish Remove="@(_FixedResolvedFileToPublish)" />
</ItemGroup>
</Target>

</Project>
16 changes: 13 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var PREVIEW_NUGET_SUFFIX = string.IsNullOrEmpty (BUILD_NUMBER)
? $"{PREVIEW_LABEL}"
: $"{PREVIEW_LABEL}.{BUILD_NUMBER}";

var PREVIEW_FEED_URL = "https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json";
var PREVIEW_FEED_URL = Argument ("previewFeed", "https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json");

var TRACKED_NUGETS = new Dictionary<string, Version> {
{ "SkiaSharp", new Version (1, 57, 0) },
Expand Down Expand Up @@ -88,7 +88,6 @@ var TRACKED_NUGETS = new Dictionary<string, Version> {
};

var PREVIEW_ONLY_NUGETS = new List<string> {
"SkiaSharp.Views.WinUI",
"SkiaSharp.Views.Maui.Core",
"SkiaSharp.Views.Maui.Controls",
"SkiaSharp.Views.Maui.Controls.Compatibility",
Expand Down Expand Up @@ -138,7 +137,17 @@ Task ("libs")
platform = ".Linux";
}
}
RunMSBuild ($"./source/SkiaSharpSource{platform}.sln");

var net6 = $"./source/SkiaSharpSource{platform}-net6.slnf";
var netfx = $"./source/SkiaSharpSource{platform}-netfx.slnf";
if (FileExists (net6) || FileExists (netfx)) {
if (FileExists (net6))
RunMSBuild (net6, properties: new Dictionary<string, string> { { "BuildingForNet6", "true" } });
if (FileExists (netfx))
RunMSBuild (netfx, properties: new Dictionary<string, string> { { "BuildingForNet6", "false" } });
} else {
RunMSBuild ($"./source/SkiaSharpSource{platform}.sln");
}

// assemble the mdoc docs
EnsureDirectoryExists ("./output/docs/mdoc/");
Expand Down Expand Up @@ -730,6 +739,7 @@ Task ("nuget-special")
}
if (GetFiles ("./output/nugets/*.nupkg").Count > 0) {
specials[$"_NuGets"] = $"nugets";
specials[$"_NuGetsPreview"] = $"nugets";
}

foreach (var pair in specials) {
Expand Down
11 changes: 8 additions & 3 deletions cake/UpdateDocs.cake
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ Task ("docs-download-output")
CleanDirectories ("./output");

await DownloadPackageAsync ("_nugets", OUTPUT_NUGETS_PATH);
await DownloadPackageAsync ("_nugetspreview", OUTPUT_NUGETS_PATH);

foreach (var id in TRACKED_NUGETS.Keys) {
var version = GetVersion (id);
var name = $"{id}.{version}.nupkg";
var localNugetVersion = PREVIEW_ONLY_NUGETS.Contains(id)
? $"{version}-{PREVIEW_NUGET_SUFFIX}"
: version;
var name = $"{id}.{localNugetVersion}.nupkg";
CleanDirectories ($"./output/{id}");
Unzip ($"{OUTPUT_NUGETS_PATH}/{name}", $"./output/{id}/nuget");
}
Expand All @@ -70,9 +74,10 @@ Task ("docs-api-diff")
comparer.SaveAssemblyApiInfo = true;
comparer.SaveAssemblyMarkdownDiff = true;

// some libraries depend on SkiaSharp
// some parts of SkiaSharp depend on other parts
comparer.SearchPaths.Add($"./output/SkiaSharp/nuget/lib/netstandard2.0");
comparer.SearchPaths.Add($"./output/SkiaSharp.Views.Maui.Core/nuget/lib/netstandard2.0");
foreach (var dir in GetDirectories($"./output/SkiaSharp.Views.Maui.Core/nuget/lib/*"))
comparer.SearchPaths.Add(dir.FullPath);

var filter = new NuGetVersions.Filter {
IncludePrerelease = NUGET_DIFF_PRERELEASE
Expand Down
23 changes: 6 additions & 17 deletions cake/UtilsManaged.cake
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,12 @@ string[] GetDotNetPacksSearchPaths()
var latestSdk = (DirectoryPath)(last.Substring(start, last.Length - start - 1));
var dotnetRoot = latestSdk.Combine("..");

var packs = GetDirectories(dotnetRoot.Combine("packs").FullPath + "/*.Ref");
foreach(var pack in GetDirectories(dotnetRoot.Combine("packs").FullPath + "/*.Ref.*")) {
var latestPath = GetDirectories(pack.FullPath + "/*").Last();
refs.AddRange(GetDirectories(latestPath.FullPath + "/ref/net*").Select(d => d.FullPath));
}

foreach(var pack in packs) {
foreach(var pack in GetDirectories(dotnetRoot.Combine("packs").FullPath + "/*.Ref")) {
var latestPath = GetDirectories(pack.FullPath + "/*").Last();
refs.AddRange(GetDirectories(latestPath.FullPath + "/ref/net*").Select(d => d.FullPath));
}
Expand Down Expand Up @@ -253,22 +256,8 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
await AddDep("Uno.UI", "UAP");
await AddDep("Microsoft.ProjectReunion.Foundation", "net5.0-windows");
await AddDep("Microsoft.ProjectReunion.WinUI", "net5.0-windows10.0.18362.0");
await AddDep("Microsoft.Maui.Graphics", "netstandard2.0");
await AddDep("Microsoft.Windows.SDK.NET.Ref", "");
await AddDep("Microsoft.Maui.Core", "net6.0-android30.0");
await AddDep("Microsoft.Maui.Core", "net6.0-ios13.6");
await AddDep("Microsoft.Maui.Core", "net6.0-maccatalyst13.5");
await AddDep("Microsoft.Maui.Core", "net6.0-windows10.0.18362");
await AddDep("Microsoft.Maui.Core", "netstandard2.0");
await AddDep("Microsoft.Maui.Controls", "net6.0-android30.0");
await AddDep("Microsoft.Maui.Controls", "net6.0-ios13.6");
await AddDep("Microsoft.Maui.Controls", "net6.0-maccatalyst13.5");
await AddDep("Microsoft.Maui.Controls", "net6.0-windows10.0.18362");
await AddDep("Microsoft.Maui.Controls", "netstandard2.0");
await AddDep("Microsoft.Maui.Controls.Compatibility", "net6.0-android30.0");
await AddDep("Microsoft.Maui.Controls.Compatibility", "net6.0-ios13.6");
await AddDep("Microsoft.Maui.Controls.Compatibility", "net6.0-maccatalyst13.5");
await AddDep("Microsoft.Maui.Controls.Compatibility", "net6.0-windows10.0.18362");
await AddDep("Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup", "net6.0-android30.0");

await AddDep("OpenTK.GLControl", "NET40", "reference");
await AddDep("Xamarin.Forms", "Xamarin.iOS10", "reference");
Expand Down
3 changes: 3 additions & 0 deletions cake/msbuild.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ DirectoryPath OUTPUT_SPECIAL_NUGETS_PATH = MakeAbsolute(ROOT_PATH.Combine("outpu
var NUGETS_SOURCES = new [] {
OUTPUT_NUGETS_PATH.FullPath,
"https://api.nuget.org/v3/index.json",
"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json",
"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json",
"https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json",
"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"
};

Expand Down
6 changes: 6 additions & 0 deletions changelogs/SkiaSharp.HarfBuzz/2.88.0/SkiaSharp.HarfBuzz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API diff: SkiaSharp.HarfBuzz.dll

## SkiaSharp.HarfBuzz.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# API diff: SkiaSharp.Views.Desktop.Common.dll

## SkiaSharp.Views.Desktop.Common.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
### Namespace SkiaSharp.Views.Desktop

#### Type Changed: SkiaSharp.Views.Desktop.Extensions

Added methods:

```csharp
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKBitmap skiaBitmap);
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKImage skiaImage);
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPixmap pixmap);
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPicture picture, SkiaSharp.SKSizeI dimensions);
public static SkiaSharp.SKBitmap ToSKBitmap (this System.Drawing.Bitmap bitmap);
public static SkiaSharp.SKImage ToSKImage (this System.Drawing.Bitmap bitmap);
public static void ToSKPixmap (this System.Drawing.Bitmap bitmap, SkiaSharp.SKPixmap pixmap);
```



Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API diff: SkiaSharp.Views.Forms.dll

## SkiaSharp.Views.Forms.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API diff: SkiaSharp.Views.Forms.dll

## SkiaSharp.Views.Forms.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API diff: SkiaSharp.Views.Forms.dll

## SkiaSharp.Views.Forms.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
6 changes: 6 additions & 0 deletions changelogs/SkiaSharp.Views.Gtk2/2.88.0/SkiaSharp.Views.Gtk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API diff: SkiaSharp.Views.Gtk.dll

## SkiaSharp.Views.Gtk.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API diff: SkiaSharp.Views.Gtk3.dll

## SkiaSharp.Views.Gtk3.dll

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# API diff: SkiaSharp.Views.Maui.Controls.Compatibility.dll

## SkiaSharp.Views.Maui.Controls.Compatibility.dll

> Assembly Version Changed: 2.88.0.0 vs 0.0.0.0
### New Namespace SkiaSharp.Views.Maui.Controls.Compatibility

#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.AppHostBuilderExtensions

```csharp
public static class AppHostBuilderExtensions {
// methods
public static Microsoft.Maui.Hosting.IAppHostBuilder UseSkiaSharpCompatibilityRenderers (this Microsoft.Maui.Hosting.IAppHostBuilder builder);
}
```

#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.SKCanvasViewRenderer

```csharp
public class SKCanvasViewRenderer : SkiaSharp.Views.Maui.Controls.Compatibility.SKCanvasViewRendererBase`2[SkiaSharp.Views.Maui.Controls.SKCanvasView,SkiaSharp.Views.Windows.SKXamlCanvas] {
// constructors
public SKCanvasViewRenderer ();
// methods
protected override SkiaSharp.Views.Windows.SKXamlCanvas CreateNativeControl ();
}
```

#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.SKCanvasViewRendererBase`2

```csharp
public abstract class SKCanvasViewRendererBase`2 : Microsoft.Maui.Controls.Compatibility.Platform.UWP.ViewRenderer`2[TFormsView,TNativeView] {
// constructors
protected SKCanvasViewRendererBase`2 ();
// methods
protected virtual TNativeView CreateNativeControl ();
protected override void Dispose (bool disposing);
protected override void OnElementChanged (Microsoft.Maui.Controls.Platform.ElementChangedEventArgs<TFormsView> e);
protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e);
}
```

#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.SKImageSourceHandler

```csharp
public sealed class SKImageSourceHandler : Microsoft.Maui.Controls.IRegisterable {
// constructors
public SKImageSourceHandler ();
// methods
public virtual System.Threading.Tasks.Task<Microsoft.UI.Xaml.Media.ImageSource> LoadImageAsync (Microsoft.Maui.Controls.ImageSource imagesource, System.Threading.CancellationToken cancelationToken);
}
```

Loading

0 comments on commit 73ac5d0

Please sign in to comment.