Skip to content

Commit 4127db7

Browse files
authored
Use AsyncTask from xamarin-android-tools (#9017)
* Use AsyncTask from xamarin-android-tools We've decided to move https://github.com/xamarin/Xamarin.Build.AsyncTask into xamarin-android-tools as part of dotnet org migration efforts. * Remove old AsyncTask usage * Update * Bump monodroid * Bump xat * Bump monodroid * AndroidAsyncTask -> AsyncTask * AndroidAsyncTask -> AsyncTask * Fix RunParallelCmds * Bump monodroid * Bump dependencies * Formatting
1 parent da318a0 commit 4127db7

File tree

19 files changed

+19
-28
lines changed

19 files changed

+19
-28
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
xamarin/monodroid:main@e11d9a5af8f00a88d15bd87c777608f17c4ece78
1+
xamarin/monodroid:main@038240c52a7dc2e66b9ad2ddb20b9886836eaec9

Documentation/guides/MSBuildBestPractices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ public class MyTask : AndroidTask
612612
The benefit here is that if an unhandled exception is thrown, `MyTask`
613613
will automatically generate proper error codes.
614614

615-
`AndroidAsyncTask` has an additional override for doing work on a
615+
`AsyncTask` has an additional override for doing work on a
616616
background thread:
617617

618618
```csharp

build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
<ItemGroup>
2020
<ProjectReference Include="..\xa-prep-tasks\xa-prep-tasks.csproj" />
21+
<ProjectReference Include="..\..\external\xamarin-android-tools\src\Microsoft.Android.Build.BaseTasks\Microsoft.Android.Build.BaseTasks.csproj" />
2122
<ProjectReference Include="..\..\external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj" />
2223
</ItemGroup>
2324

build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/RunParallelCmds.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
using System.Text;
44
using System.Diagnostics;
55

6+
using Microsoft.Android.Build.Tasks;
7+
68
using Microsoft.Build.Framework;
79
using Microsoft.Build.Utilities;
810

9-
using Xamarin.Build;
10-
1111
using Tasks = System.Threading.Tasks;
1212

1313
namespace Xamarin.Android.Tools.BootstrapTasks
1414
{
1515
public class RunParallelCmds : AsyncTask
1616
{
17+
public override string TaskPrefix => "RPCMD";
18+
1719
[Required]
1820
public ITaskItem[] Commands { get; set; }
1921

build-tools/installers/create-installers.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@
165165
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.AndroidSdk.dll" />
166166
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.AndroidSdk.pdb" />
167167
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.Versions.props" />
168-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.dll" />
169-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.pdb" />
170168
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)K4os.Compression.LZ4.dll" />
171169
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)ELFSharp.dll" />
172170
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)ManifestOverlays\Timing.xml" />

build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Sleep.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Xamarin.Android.BuildTools.PrepTasks
1111
{
12-
public class XASleepInternal : AndroidAsyncTask
12+
public class XASleepInternal : AsyncTask
1313
{
1414
public override string TaskPrefix => "XASI";
1515
public int Milliseconds { get; set; }

src-ThirdParty/android-platform-tools-base/SymbolWriter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Linq;
66
using System.Text;
77
using Xamarin.Android.Tools;
8-
using Xamarin.Build;
98
using Microsoft.Android.Build.Tasks;
109

1110
namespace Xamarin.Android.Tasks

src/Xamarin.Android.Build.Tasks/Tasks/Aapt.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
using System.Text.RegularExpressions;
1414
using System.Collections.Generic;
1515
using Xamarin.Android.Tools;
16-
using Xamarin.Build;
1716
using Microsoft.Android.Build.Tasks;
1817

1918
namespace Xamarin.Android.Tasks
2019
{
21-
public class Aapt : AndroidAsyncTask
20+
public class Aapt : AsyncTask
2221
{
2322
public override string TaskPrefix => "APT";
2423

src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
using System.Collections.Concurrent;
1616
using Xamarin.Android.Tools;
1717
using ThreadingTasks = System.Threading.Tasks;
18-
using Xamarin.Build;
1918
using Microsoft.Android.Build.Tasks;
2019

2120
namespace Xamarin.Android.Tasks {
2221

23-
public abstract class Aapt2 : AndroidAsyncTask {
22+
public abstract class Aapt2 : AsyncTask {
2423

2524
private const int MAX_PATH = 260;
2625
private const int ASCII_MAX_CHAR = 127;

0 commit comments

Comments
 (0)