diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt.cs index 0fe92a5c14e..b62bc2833d2 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt.cs @@ -332,7 +332,7 @@ protected string GenerateCommandLineCommands (string ManifestFile, string curren } if (!string.IsNullOrWhiteSpace (UncompressedFileExtensions)) foreach (var ext in UncompressedFileExtensions.Split (new char[] { ';', ','}, StringSplitOptions.RemoveEmptyEntries)) - cmd.AppendSwitchIfNotNull ("-0 ", ext); + cmd.AppendSwitchIfNotNull ("-0 ", ext.StartsWith (".", StringComparison.OrdinalIgnoreCase) ? ext : $".{ext}"); if (!string.IsNullOrEmpty (ExtraPackages)) cmd.AppendSwitchIfNotNull ("--extra-packages ", ExtraPackages); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2Link.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2Link.cs index 54128d2351a..0254c6e9ee5 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2Link.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2Link.cs @@ -160,7 +160,7 @@ string GenerateCommandLineCommands (string ManifestFile, string currentAbi, stri if (!string.IsNullOrWhiteSpace (UncompressedFileExtensions)) foreach (var ext in UncompressedFileExtensions.Split (new char [] { ';', ',' }, StringSplitOptions.RemoveEmptyEntries)) - cmd.AppendSwitchIfNotNull ("-0 ", ext); + cmd.AppendSwitchIfNotNull ("-0 ", ext.StartsWith (".", StringComparison.OrdinalIgnoreCase) ? ext : $".{ext}"); if (!string.IsNullOrEmpty (ExtraPackages)) cmd.AppendSwitchIfNotNull ("--extra-packages ", ExtraPackages); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs index d9b5fcee43e..a1eb4f5454c 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs @@ -372,7 +372,7 @@ HashSet ParseProfilers (string value) CompressionMethod GetCompressionMethod (string fileName) { - if (uncompressedFileExtensions.Any (x => string.Compare (x, Path.GetExtension (fileName), StringComparison.OrdinalIgnoreCase) == 0)) + if (uncompressedFileExtensions.Any (x => string.Compare (x.StartsWith (".", StringComparison.OrdinalIgnoreCase) ? x : $".{x}", Path.GetExtension (fileName), StringComparison.OrdinalIgnoreCase) == 0)) return UncompressedMethod; return CompressionMethod.Default; } diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs index 21e60cf8a0b..13a4f9f7c2f 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs @@ -180,7 +180,7 @@ public void CheckIncludedNativeLibraries ([Values (true, false)] bool compressNa proj.PackageReferences.Add(KnownPackages.SQLitePCLRaw_Core); proj.SetProperty ("AndroidUseAapt2", useAapt2.ToString ()); proj.SetProperty(proj.ReleaseProperties, KnownProperties.AndroidSupportedAbis, "x86"); - proj.SetProperty (proj.ReleaseProperties, "AndroidStoreUncompressedFileExtensions", compressNativeLibraries ? "" : ".so"); + proj.SetProperty (proj.ReleaseProperties, "AndroidStoreUncompressedFileExtensions", compressNativeLibraries ? "" : "so"); using (var b = CreateApkBuilder (Path.Combine ("temp", TestContext.CurrentContext.Test.Name))) { b.Verbosity = Microsoft.Build.Framework.LoggerVerbosity.Diagnostic; b.ThrowOnBuildFailure = false;