Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msbuild] Merge the WriteAssetPackManifest[TaskBase] classes. #19928

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions msbuild/Xamarin.iOS.Tasks/Tasks/WriteAssetPackManifest.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
using Xamarin.MacDev;
using System.Linq;
using Xamarin.MacDev.Tasks;
using Xamarin.Messaging.Build.Client;

// Disable until we get around to enable + fix any issues.
#nullable disable

namespace Xamarin.iOS.Tasks {
public abstract class WriteAssetPackManifestTaskBase : XamarinTask {
public abstract class WriteAssetPackManifestTaskBase : XamarinTask, ICancelableTask {
#region Inputs

[Required]
Expand All @@ -28,6 +29,9 @@ public abstract class WriteAssetPackManifestTaskBase : XamarinTask {

public override bool Execute ()
{
if (ShouldExecuteRemotely ())
return new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result;

var template = PDictionary.FromFile (TemplatePath.ItemSpec);
var resources = template.GetArray ("resources");

Expand All @@ -53,5 +57,11 @@ public override bool Execute ()

return !Log.HasLoggedErrors;
}

public void Cancel ()
{
if (ShouldExecuteRemotely ())
BuildConnection.CancelAsync (BuildEngine4).Wait ();
}
}
}
Loading