From 01da59b12f70de65422349c5bc0e3ac158a2ac2c Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Mon, 4 Nov 2024 13:38:04 +0000 Subject: [PATCH] more changes --- .../Android/Xamarin.Android.Aapt2.targets | 2 +- .../Xamarin.Android.Resource.Designer.targets | 19 +++++++++++++++++-- .../IncrementalBuildTest.cs | 5 +++++ .../Xamarin.Android.EmbeddedResource.targets | 5 +++-- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets index 6baf37a9e36..be0c6c61539 100644 --- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets +++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets @@ -27,7 +27,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. - + <_SetLatestTargetFrameworkVersionDependsOnTargets> $(_SetLatestTargetFrameworkVersionDependsOnTargets); _CreateAapt2VersionCache; diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets index 7c6ae426b60..6392809dded 100644 --- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets +++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets @@ -58,9 +58,24 @@ Copyright (C) 2016 Xamarin. All rights reserved. + + + + + + + + + @@ -78,7 +93,7 @@ Copyright (C) 2016 Xamarin. All rights reserved. diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs index e4da47a23a4..ce1079fcf26 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs @@ -1179,14 +1179,19 @@ public void DesignTimeBuild () Assert.IsTrue (b.DesignTimeBuild (proj), "first dtb should have succeeded."); var target = "_GenerateResourceDesignerAssembly"; Assert.IsFalse (b.Output.IsTargetSkipped (target), $"`{target}` should not have been skipped."); + var importsTarget = "_ResolveLibraryProjectImports"; + Assert.IsTrue (b.Output.IsTargetSkipped (importsTarget, defaultIfNotUsed: true), $"`{importsTarget}` should have been skipped."); // DesignTimeBuild=true lowercased var parameters = new [] { "DesignTimeBuild=true" }; Assert.IsTrue (b.RunTarget (proj, "Compile", doNotCleanupOnUpdate: true, parameters: parameters), "second dtb should have succeeded."); Assert.IsTrue (b.Output.IsTargetSkipped (target, defaultIfNotUsed: true), $"`{target}` should have been skipped."); + Assert.IsTrue (b.Output.IsTargetSkipped (importsTarget, defaultIfNotUsed: true), $"`{importsTarget}` should have been skipped."); Assert.IsTrue (b.RunTarget (proj, "UpdateGeneratedFiles", doNotCleanupOnUpdate: true, parameters: parameters), "UpdateGeneratedFiles should have succeeded."); Assert.IsTrue (b.Output.IsTargetSkipped (target, defaultIfNotUsed: true), $"`{target}` should have been skipped."); + Assert.IsTrue (b.Output.IsTargetSkipped (importsTarget, defaultIfNotUsed: true), $"`{importsTarget}` should have been skipped."); Assert.IsTrue (b.Build (proj, doNotCleanupOnUpdate: true, saveProject: false), "full build should have succeeded."); Assert.IsFalse (b.Output.IsTargetSkipped (target), $"`{target}` should not have been skipped."); + Assert.IsFalse (b.Output.IsTargetSkipped (importsTarget), $"`{importsTarget}` should not have been skipped."); } } diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets index 71f5196abdc..81f38712cdb 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets @@ -33,7 +33,6 @@ This file is used by all project types, including binding projects. @@ -57,7 +56,9 @@ This file is used by all project types, including binding projects. - +