From 2e1570db97ba4769a937ddf49a32ce6ce7fa3bcb Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 10 Apr 2018 17:29:22 +0200 Subject: [PATCH 1/6] Include preview in VSLatest --- build.cake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index 7d5b33593..8a8f2c711 100644 --- a/build.cake +++ b/build.cake @@ -62,7 +62,13 @@ Task("ResolveBuildTools") .WithCriteria(() => IsRunningOnWindows()) .Does(() => { - var vsLatest = VSWhereLatest(); + var vsWhereSettings = new VSWhereLatestSettings + { + IncludePrerelease = true, + Requires = "Component.Xamarin" + }; + + var vsLatest = VSWhereLatest(vsWhereSettings); msBuildPath = (vsLatest == null) ? null : vsLatest.CombineWithFilePath("./MSBuild/15.0/Bin/MSBuild.exe"); From fe8b934a7f116458399225b0575b24ce3a203ea0 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 10 Apr 2018 17:29:43 +0200 Subject: [PATCH 2/6] Build Android stuff first, then build the rest. --- build.cake | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index 8a8f2c711..c29011ce7 100644 --- a/build.cake +++ b/build.cake @@ -106,7 +106,8 @@ Task("Build") .WithProperty("Version", versionInfo.SemVer) .WithProperty("PackageVersion", versionInfo.SemVer) .WithProperty("InformationalVersion", versionInfo.InformationalVersion) - .WithProperty("NoPackageAnalysis", "True"); + .WithProperty("NoPackageAnalysis", "True") + .WithTarget("Build"); settings.BinaryLogger = new MSBuildBinaryLogSettings { @@ -114,6 +115,25 @@ Task("Build") FileName = "mvvmcross.binlog" }; + var buildItems = new string[] + { + "./MvvmCross/MvvmCross.csproj", + "./MvvmCross.Android.Support/Fragment/MvvmCross.Droid.Support.Fragment.csproj", + "./MvvmCross.Android.Support/Design/MvvmCross.Droid.Support.Design.csproj", + "./MvvmCross.Android.Support/Core.Utils/MvvmCross.Droid.Support.Core.Utils.csproj", + "./MvvmCross.Android.Support/Core.UI/MvvmCross.Droid.Support.Core.UI.csproj", + "./MvvmCross.Android.Support/V7.AppCompat/MvvmCross.Droid.Support.V7.AppCompat.csproj", + "./MvvmCross.Android.Support/V7.Preference/MvvmCross.Droid.Support.V7.Preference.csproj", + "./MvvmCross.Android.Support/V7.RecyclerView/MvvmCross.Droid.Support.V7.RecyclerView.csproj", + "./MvvmCross.Android.Support/V14.Preference/MvvmCross.Droid.Support.V14.Preference.csproj", + "./MvvmCross.Android.Support/V17.Leanback/MvvmCross.Droid.Support.V17.Leanback.csproj", + }; + + // workaround for Xamarin.Android throwing AAPT error -2 + foreach(var buildItem in buildItems) + MSBuild(new FilePath(buildItem), settings); + + // build the rest MSBuild(sln, settings); }); From 1b0c4c2338e9a40f052e2834659b70093d0dbdd3 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 10 Apr 2018 18:01:53 +0200 Subject: [PATCH 3/6] Build Location.Fused and Forms separately and produce binlogs separately too --- build.cake | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/build.cake b/build.cake index c29011ce7..72b23e1a0 100644 --- a/build.cake +++ b/build.cake @@ -111,8 +111,7 @@ Task("Build") settings.BinaryLogger = new MSBuildBinaryLogSettings { - Enabled = true, - FileName = "mvvmcross.binlog" + Enabled = true }; var buildItems = new string[] @@ -127,12 +126,23 @@ Task("Build") "./MvvmCross.Android.Support/V7.RecyclerView/MvvmCross.Droid.Support.V7.RecyclerView.csproj", "./MvvmCross.Android.Support/V14.Preference/MvvmCross.Droid.Support.V14.Preference.csproj", "./MvvmCross.Android.Support/V17.Leanback/MvvmCross.Droid.Support.V17.Leanback.csproj", + "./MvvmCross.Plugins/Location/MvvmCross.Plugin.Location.csproj", + "./MvvmCross.Plugins/Location.Fused/MvvmCross.Plugin.Location.Fused.csproj", + "./MvvmCross.Forms/MvvmCross.Forms.csproj", }; // workaround for Xamarin.Android throwing AAPT error -2 foreach(var buildItem in buildItems) - MSBuild(new FilePath(buildItem), settings); + { + var filePath = new FilePath(buildItem); + var name = filePath.GetFilenameWithoutExtension(); + settings.BinaryLogger.FileName = name + ".binlog"; + + MSBuild(filePath, settings); + } + + settings.BinaryLogger.FileName = "mvvmcross2.binlog"; // build the rest MSBuild(sln, settings); }); From 9ebda5074cccc465ccc227daec52aa867187f8a9 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 10 Apr 2018 19:05:39 +0200 Subject: [PATCH 4/6] Build everything serially --- build.cake | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/build.cake b/build.cake index 72b23e1a0..f7321b5c4 100644 --- a/build.cake +++ b/build.cake @@ -128,10 +128,31 @@ Task("Build") "./MvvmCross.Android.Support/V17.Leanback/MvvmCross.Droid.Support.V17.Leanback.csproj", "./MvvmCross.Plugins/Location/MvvmCross.Plugin.Location.csproj", "./MvvmCross.Plugins/Location.Fused/MvvmCross.Plugin.Location.Fused.csproj", + "./MvvmCross.Plugins/PictureChooser/MvvmCross.Plugin.PictureChooser.csproj", + "./MvvmCross.Plugins/Email/MvvmCross.Plugin.Email.csproj", + "./MvvmCross.Plugins/Accelerometer/MvvmCross.Plugin.Accelerometer.csproj", + "./MvvmCross.Plugins/Color/MvvmCross.Plugin.Color.csproj", + "./MvvmCross.Plugins/FieldBinding/MvvmCross.Plugin.FieldBinding.csproj", + "./MvvmCross.Plugins/File/MvvmCross.Plugin.File.csproj", + "./MvvmCross.Plugins/Json/MvvmCross.Plugin.Json.csproj", + "./MvvmCross.Plugins/JsonLocalization/MvvmCross.Plugin.JsonLocalization.csproj", + "./MvvmCross.Plugins/Messenger/MvvmCross.Plugin.Messenger.csproj", + "./MvvmCross.Plugins/MethodBinding/MvvmCross.Plugin.MethodBinding.csproj", + "./MvvmCross.Plugins/Network/MvvmCross.Plugin.Network.csproj", + "./MvvmCross.Plugins/PhoneCall/MvvmCross.Plugin.PhoneCall.csproj", + "./MvvmCross.Plugins/PictureChooser/MvvmCross.Plugin.PictureChooser.csproj", + "./MvvmCross.Plugins/ResourceLoader/MvvmCross.Plugin.ResourceLoader.csproj", + "./MvvmCross.Plugins/ResxLocalization/MvvmCross.Plugin.ResxLocalization.csproj", + "./MvvmCross.Plugins/Share/MvvmCross.Plugin.Share.csproj", + "./MvvmCross.Plugins/Sidebar/MvvmCross.Plugin.Sidebar.csproj", + "./MvvmCross.Plugins/Visibility/MvvmCross.Plugin.Visibility.csproj", + "./MvvmCross.Plugins/WebBrowser/MvvmCross.Plugin.WebBrowser.csproj", + "./MvvmCross.Plugins/All/MvvmCross.Plugin.All.csproj", "./MvvmCross.Forms/MvvmCross.Forms.csproj", + "./MvvmCross.Analyzers/CodeAnalysis/MvvmCross.CodeAnalysis.csproj" }; - // workaround for Xamarin.Android throwing AAPT error -2 + // workaround for Xamarin.Android throwing AAPT error -2, instead of building sln :( foreach(var buildItem in buildItems) { var filePath = new FilePath(buildItem); @@ -141,10 +162,16 @@ Task("Build") MSBuild(filePath, settings); } - - settings.BinaryLogger.FileName = "mvvmcross2.binlog"; - // build the rest - MSBuild(sln, settings); + + var testItems = GetFiles("./UnitTests/*.UnitTest/*.UnitTest.csproj"); + foreach(var testItem in testItems) + { + var name = testItem.GetFilenameWithoutExtension(); + + settings.BinaryLogger.FileName = name + ".binlog"; + + MSBuild(testItem, settings); + } }); Task("UnitTest") From c542c868681569d4ac937b3c3ef870fac8f78f1a Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 10 Apr 2018 20:01:40 +0200 Subject: [PATCH 5/6] Add todo in build.cake --- build.cake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index f7321b5c4..fe3986095 100644 --- a/build.cake +++ b/build.cake @@ -111,9 +111,13 @@ Task("Build") settings.BinaryLogger = new MSBuildBinaryLogSettings { - Enabled = true + Enabled = true, + //FileName = "mvvmcross.binlog" }; + // TODO change back to this when parallel builds are working with Xamarin.Android again + // MSBuild(sln, settings); + var buildItems = new string[] { "./MvvmCross/MvvmCross.csproj", From 9d891ab945c5a2419f2278e1acda2f0c7ba80015 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 10 Apr 2018 20:02:11 +0200 Subject: [PATCH 6/6] Move visibility UnitTests to .UnitTest folder --- MvvmCross.sln | 2 +- .../MvvmCross.Plugins.Visibility.UnitTest.csproj | 0 .../VisibilityCollection.cs | 0 .../VisibilityValueConverterTest.cs | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename UnitTests/{Plugins.Visibility => Plugins.Visibility.UnitTest}/MvvmCross.Plugins.Visibility.UnitTest.csproj (100%) rename UnitTests/{Plugins.Visibility => Plugins.Visibility.UnitTest}/VisibilityCollection.cs (100%) rename UnitTests/{Plugins.Visibility => Plugins.Visibility.UnitTest}/VisibilityValueConverterTest.cs (100%) diff --git a/MvvmCross.sln b/MvvmCross.sln index 5b767cb3c..67a499cd4 100644 --- a/MvvmCross.sln +++ b/MvvmCross.sln @@ -142,7 +142,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Playground.Uwp", "Projects\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Playground.Wpf", "Projects\Playground\Playground.Wpf\Playground.Wpf.csproj", "{88FD9F4C-2A82-4919-91F4-AFB2999F6394}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MvvmCross.Plugins.Visibility.UnitTest", "UnitTests\Plugins.Visibility\MvvmCross.Plugins.Visibility.UnitTest.csproj", "{B5581657-2A45-4FE7-AFC9-96EA06188582}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MvvmCross.Plugins.Visibility.UnitTest", "UnitTests\Plugins.Visibility.UnitTest\MvvmCross.Plugins.Visibility.UnitTest.csproj", "{B5581657-2A45-4FE7-AFC9-96EA06188582}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/UnitTests/Plugins.Visibility/MvvmCross.Plugins.Visibility.UnitTest.csproj b/UnitTests/Plugins.Visibility.UnitTest/MvvmCross.Plugins.Visibility.UnitTest.csproj similarity index 100% rename from UnitTests/Plugins.Visibility/MvvmCross.Plugins.Visibility.UnitTest.csproj rename to UnitTests/Plugins.Visibility.UnitTest/MvvmCross.Plugins.Visibility.UnitTest.csproj diff --git a/UnitTests/Plugins.Visibility/VisibilityCollection.cs b/UnitTests/Plugins.Visibility.UnitTest/VisibilityCollection.cs similarity index 100% rename from UnitTests/Plugins.Visibility/VisibilityCollection.cs rename to UnitTests/Plugins.Visibility.UnitTest/VisibilityCollection.cs diff --git a/UnitTests/Plugins.Visibility/VisibilityValueConverterTest.cs b/UnitTests/Plugins.Visibility.UnitTest/VisibilityValueConverterTest.cs similarity index 100% rename from UnitTests/Plugins.Visibility/VisibilityValueConverterTest.cs rename to UnitTests/Plugins.Visibility.UnitTest/VisibilityValueConverterTest.cs