Skip to content

Commit a9f513f

Browse files
committed
Let's see what, if anything, is fixed by this
1 parent a32b16f commit a9f513f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ public XamarinAndroidApplicationProject (string debugConfigurationName = "Debug"
6969
AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\values\\Strings.xml") { TextContent = () => StringsXml.Replace ("${PROJECT_NAME}", ProjectName) });
7070

7171
Sources.Add (new BuildItem.Source (() => "MainActivity" + Language.DefaultExtension) { TextContent = () => ProcessSourceTemplate (MainActivity ?? DefaultMainActivity) });
72+
73+
// This is a quick hack to get all the tests executing in the CoreCLR context to work only for the, currently limited,
74+
// subset of ABIs supported by CoreCLR without having to modify each test individually. Eventually it shouldn't be necessary.
75+
if (TargetRuntimeHelper.UseCoreCLR) {
76+
this.SetRuntimeIdentifiers (TargetRuntimeHelper.CoreClrSupportedAbis);
77+
}
7278
}
7379

7480
// it is exposed as public because we may want to slightly modify this.

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Utilities/TargetRuntimeHelper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace Xamarin.ProjectTools;
55
public class TargetRuntimeHelper
66
{
77
static readonly bool useMonoRuntime;
8+
static readonly string[] coreClrSupportedAbis = new []{ "arm64-v8a" };
89

910
static TargetRuntimeHelper ()
1011
{
@@ -18,4 +19,5 @@ static TargetRuntimeHelper ()
1819

1920
public static bool UseMonoRuntime => useMonoRuntime;
2021
public static bool UseCoreCLR => !useMonoRuntime;
21-
}
22+
public static string[] CoreClrSupportedAbis => coreClrSupportedAbis;
23+
}

0 commit comments

Comments
 (0)