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 SpotlightIndexer[TaskBase] classes. #19893

Merged
merged 1 commit into from
Jan 24, 2024
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
22 changes: 0 additions & 22 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/SpotlightIndexer.cs

This file was deleted.

20 changes: 19 additions & 1 deletion msbuild/Xamarin.MacDev.Tasks/Tasks/SpotlightIndexerTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;

using Xamarin.Messaging.Build.Client;

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

namespace Xamarin.MacDev.Tasks {
public abstract class SpotlightIndexerTaskBase : XamarinToolTask {
public class SpotlightIndexer : XamarinToolTask {
#region Inputs

[Required]
Expand Down Expand Up @@ -44,5 +46,21 @@ protected override void LogEventsFromTextOutput (string singleLine, MessageImpor
// TODO: do proper parsing of error messages and such
Log.LogMessage (messageImportance, "{0}", singleLine);
}

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

return base.Execute ();
}

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

base.Execute ();
}
}
}
Loading