(StringComparer.OrdinalIgnoreCase);
- foreach (var file in InputRemapXmlFiles) {
- if (!seen.Add (file.ItemSpec)) {
- continue;
+ if (InputRemapXmlFiles != null) {
+ foreach (var file in InputRemapXmlFiles) {
+ if (!seen.Add (file.ItemSpec)) {
+ continue;
+ }
+ MergeInputFile (writer, file.ItemSpec);
}
- MergeInputFile (writer, file.ItemSpec);
}
writer.WriteEndElement ();
}
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/StripNativeLibraries.cs b/src/Xamarin.Android.Build.Tasks/Tasks/StripNativeLibraries.cs
index f40c25aedb4..fc753b82e71 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/StripNativeLibraries.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/StripNativeLibraries.cs
@@ -1,4 +1,4 @@
-#nullable disable
+#nullable enable
using System;
using System.IO;
@@ -16,19 +16,19 @@ public class StripNativeLibraries : AndroidToolTask
{
public override string TaskPrefix => "SNL";
- public ITaskItem [] SourceFiles { get; set; }
+ public ITaskItem []? SourceFiles { get; set; }
- public ITaskItem [] DestinationFiles { get; set; }
+ public ITaskItem []? DestinationFiles { get; set; }
- string triple;
- ITaskItem source;
- ITaskItem destination;
+ string? triple;
+ ITaskItem? source;
+ ITaskItem? destination;
public override bool RunTask ()
{
- if (SourceFiles.Length != DestinationFiles.Length)
+ if (SourceFiles == null || DestinationFiles == null || SourceFiles.Length != DestinationFiles.Length)
throw new ArgumentException ("source and destination count mismatch");
- if (SourceFiles == null || SourceFiles.Length == 0)
+ if (SourceFiles.Length == 0)
return true;
for (int i = 0; i < SourceFiles.Length; i++) {
@@ -36,9 +36,9 @@ public override bool RunTask ()
destination = DestinationFiles [i];
var abi = AndroidRidAbiHelper.GetNativeLibraryAbi (source);
- if (string.IsNullOrEmpty (abi)) {
+ if (abi.IsNullOrEmpty ()) {
var packageId = source.GetMetadata ("NuGetPackageId");
- if (!string.IsNullOrEmpty (packageId)) {
+ if (!packageId.IsNullOrEmpty ()) {
Log.LogCodedWarning ("XA4301", source.ItemSpec, 0, Properties.Resources.XA4301_ABI_NuGet, source.ItemSpec, packageId);
} else {
Log.LogCodedWarning ("XA4301", source.ItemSpec, 0, Properties.Resources.XA4301_ABI, source.ItemSpec);
@@ -67,8 +67,8 @@ public override bool RunTask ()
protected override string GenerateCommandLineCommands ()
{
var cmd = new CommandLineBuilder ();
- cmd.AppendSwitchIfNotNull ("--strip-debug ", source.ItemSpec);
- cmd.AppendSwitchIfNotNull ("-o ", destination.ItemSpec);
+ cmd.AppendSwitchIfNotNull ("--strip-debug ", source?.ItemSpec);
+ cmd.AppendSwitchIfNotNull ("-o ", destination?.ItemSpec);
return cmd.ToString ();
}
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy