Skip to content

Commit

Permalink
[msbuild] Merge the ValidateAppBundle[TaskBase] classes. (#19907)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Jan 26, 2024
1 parent 75edf84 commit e90ef18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
20 changes: 0 additions & 20 deletions msbuild/Xamarin.iOS.Tasks/Tasks/ValidateAppBundleTask.cs

This file was deleted.

12 changes: 11 additions & 1 deletion msbuild/Xamarin.iOS.Tasks/Tasks/ValidateAppBundleTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
using Xamarin.MacDev;
using Xamarin.MacDev.Tasks;
using Xamarin.Utils;
using Xamarin.Messaging.Build.Client;
using Xamarin.Localization.MSBuild;

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

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

[Required]
Expand Down Expand Up @@ -287,6 +288,9 @@ void ValidateWatchExtension (string path, string watchAppBundleIdentifier, strin

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

var mainInfoPath = PlatformFrameworkHelper.GetAppManifestPath (Platform, AppBundlePath);
if (!File.Exists (mainInfoPath)) {
Log.LogError (7040, AppBundlePath, MSBStrings.E7040, AppBundlePath);
Expand Down Expand Up @@ -377,5 +381,11 @@ public override bool Execute ()

return !Log.HasLoggedErrors;
}

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

6 comments on commit e90ef18

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.