From 231d1c8bf8cbb8d356c6033ed6fd47c6a9fe402e Mon Sep 17 00:00:00 2001 From: Redth Date: Tue, 4 Apr 2017 08:50:14 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=94no-version-vectors=20agai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There were some initial optimizations done to the adding of —no-version-vectors to AndroidResgenExtraArgs, but they were made to the wrong file. The build script caused the modified file to be overwritten during the build making the changes ineffective. This commit cleans up where the .targets file lives so the build tasks project reads it from one source, and the build script no longer copies the file around. --- build.cake | 2 - .../Vector-Drawable-BuildTasks.csproj | 7 +-- ...droid.Support.Tasks.VectorDrawable.targets | 45 ------------------- ...rin.Android.Support.Vector.Drawable.nuspec | 2 +- vector-drawable/nuget/merge.targets | 21 +++++---- 5 files changed, 18 insertions(+), 59 deletions(-) delete mode 100644 vector-drawable/buildtask/Xamarin.Android.Support.Tasks.VectorDrawable.targets diff --git a/build.cake b/build.cake index 4f6d252..11f73f0 100644 --- a/build.cake +++ b/build.cake @@ -594,8 +594,6 @@ Task ("buildtasks").Does (() => NuGetRestore ("./vector-drawable/buildtask/Vector-Drawable-BuildTasks.csproj"); DotNetBuild ("./vector-drawable/buildtask/Vector-Drawable-BuildTasks.csproj", c => c.Configuration = BUILD_CONFIG); - - CopyFile ("./vector-drawable/buildtask/bin/" + BUILD_CONFIG + "/Xamarin.Android.Support.Tasks.VectorDrawable.targets", "./vector-drawable/nuget/merge.targets"); }); SetupXamarinBuildTasks (buildSpec, Tasks, Task); diff --git a/vector-drawable/buildtask/Vector-Drawable-BuildTasks.csproj b/vector-drawable/buildtask/Vector-Drawable-BuildTasks.csproj index 5a20438..428060d 100644 --- a/vector-drawable/buildtask/Vector-Drawable-BuildTasks.csproj +++ b/vector-drawable/buildtask/Vector-Drawable-BuildTasks.csproj @@ -38,10 +38,11 @@ - - - Always + + merge.targets + PreserveNewest + \ No newline at end of file diff --git a/vector-drawable/buildtask/Xamarin.Android.Support.Tasks.VectorDrawable.targets b/vector-drawable/buildtask/Xamarin.Android.Support.Tasks.VectorDrawable.targets deleted file mode 100644 index 871b927..0000000 --- a/vector-drawable/buildtask/Xamarin.Android.Support.Tasks.VectorDrawable.targets +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - $(AndroidResgenExtraArgs)--no-version-vectors - - - - - - $(MSBuildThisFileDirectory)Xamarin.Android.Support.Tasks.VectorDrawable.dll - - - - - - _ResolveMonoAndroidSdks;$(VectorDrawableCheckBuildToolsVersionTaskDependsOn); - - - _UpdateAndroidResgen;$(VectorDrawableCheckBuildToolsVersionTaskBeforeTargets); - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vector-drawable/nuget/Xamarin.Android.Support.Vector.Drawable.nuspec b/vector-drawable/nuget/Xamarin.Android.Support.Vector.Drawable.nuspec index 6ae843b..ecc234a 100644 --- a/vector-drawable/nuget/Xamarin.Android.Support.Vector.Drawable.nuspec +++ b/vector-drawable/nuget/Xamarin.Android.Support.Vector.Drawable.nuspec @@ -22,7 +22,7 @@ - + diff --git a/vector-drawable/nuget/merge.targets b/vector-drawable/nuget/merge.targets index 871b927..a155bdf 100644 --- a/vector-drawable/nuget/merge.targets +++ b/vector-drawable/nuget/merge.targets @@ -1,17 +1,10 @@  - - - - $(AndroidResgenExtraArgs)--no-version-vectors - - - $(MSBuildThisFileDirectory)Xamarin.Android.Support.Tasks.VectorDrawable.dll @@ -42,4 +35,16 @@ - \ No newline at end of file + + + + $(AndroidResgenExtraArgs.TrimEnd(' ')) --no-version-vectors + + + --no-version-vectors + + + +