From fb26d16964611a7ea908819bcda5a7fe1d3bfcf8 Mon Sep 17 00:00:00 2001 From: Wyatt Davis Date: Tue, 24 Jan 2017 13:36:42 -0800 Subject: [PATCH 1/3] Fixes Binding Library Not Updating with Newer AAR - Currently there is an issue where an AAR file is updated, but the Android Binding library does not regenerate the bindings. I believe this is caused by the incorrect logic of checking if the file exists before trying to copy. We should not check if the file exists, but instead let the new file be copied over if it is indeed newer. - This logic may be incorrect in other places in the file. However, I'm not confident enough to make that call. --- .../Tasks/CreateLibraryResourceArchive.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs index 820217df8d6..bef7a7a9592 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs @@ -129,8 +129,7 @@ bool CopyLibraryContent (string projdir, bool isAar) var dstdir = Path.Combine (OutputDirectory, "bin"); foreach (var file in Directory.GetFiles (projdir)) { string dstpath = Path.Combine (dstdir, Path.GetFileName (file)); - if (!File.Exists (dstpath)) - MonoAndroidHelper.CopyIfChanged (file, dstpath); + MonoAndroidHelper.CopyIfChanged (file, dstpath); } } return true; From e8ef0dba4c34bad9a174cc778ef1ae70a7ee8221 Mon Sep 17 00:00:00 2001 From: Wyatt Davis Date: Tue, 24 Jan 2017 13:43:39 -0800 Subject: [PATCH 2/3] Changes spaces to tabs --- .../Tasks/CreateLibraryResourceArchive.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs index bef7a7a9592..6226b9452f7 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs @@ -129,7 +129,7 @@ bool CopyLibraryContent (string projdir, bool isAar) var dstdir = Path.Combine (OutputDirectory, "bin"); foreach (var file in Directory.GetFiles (projdir)) { string dstpath = Path.Combine (dstdir, Path.GetFileName (file)); - MonoAndroidHelper.CopyIfChanged (file, dstpath); + MonoAndroidHelper.CopyIfChanged (file, dstpath); } } return true; From d5b21e343113ca0657e372926f6f9c5d92a5ee49 Mon Sep 17 00:00:00 2001 From: Wyatt Davis Date: Tue, 24 Jan 2017 14:07:24 -0800 Subject: [PATCH 3/3] Removes the file exists check for copying to jar output dir --- .../Tasks/CreateLibraryResourceArchive.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs b/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs index 6226b9452f7..c69bc1d0066 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/CreateLibraryResourceArchive.cs @@ -140,8 +140,7 @@ void CopyFiles (string srcdir) foreach (var file in Directory.GetFiles (srcdir)) { if (file.EndsWith (".jar", StringComparison.OrdinalIgnoreCase)) { var dstpath = Path.Combine (OutputJarsDirectory, Path.GetFileName (file)); - if (!File.Exists (dstpath)) - MonoAndroidHelper.CopyIfChanged (file, dstpath); + BMonoAndroidHelper.CopyIfChanged (file, dstpath); } else if (file.EndsWith ("annotations.zip", StringComparison.OrdinalIgnoreCase)) { var dstpath = Path.Combine (OutputAnnotationsDirectory, Path.GetFileName (file)); if (!File.Exists (dstpath))