From af114c07d8b20596c2ccb79e5aeefee2584cfc2e Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 16 Aug 2024 11:18:50 +0300 Subject: [PATCH] chore: Adjust --- .../Given_DependencyObjectGenerator.cs | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators.Tests/DependencyObjectGeneratorTests/Given_DependencyObjectGenerator.cs b/src/SourceGenerators/Uno.UI.SourceGenerators.Tests/DependencyObjectGeneratorTests/Given_DependencyObjectGenerator.cs index 6784fdef57c0..94c8eeb77fab 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators.Tests/DependencyObjectGeneratorTests/Given_DependencyObjectGenerator.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators.Tests/DependencyObjectGeneratorTests/Given_DependencyObjectGenerator.cs @@ -19,27 +19,24 @@ public class Given_DependencyObjectGenerator private static readonly ReferenceAssemblies _net80Android = ReferenceAssemblies.Net.Net80Android.AddPackages([new PackageIdentity("Uno.Diagnostics.Eventing", "2.1.0")]); private static readonly ReferenceAssemblies _net80 = ReferenceAssemblies.Net.Net80.AddPackages([new PackageIdentity("Uno.Diagnostics.Eventing", "2.1.0")]); - private static MetadataReference[] BuildUnoReferences(bool isAndroid) - { - const string configuration = + private const string Configuration = #if DEBUG - "Debug"; + "Debug"; #else - "Release"; + "Release"; #endif - string[] availableTargets; - if (isAndroid) - { - availableTargets = [Path.Combine("Uno.UI.netcoremobile", configuration, "net8.0")]; - } - else - { - availableTargets = [ - Path.Combine("Uno.UI.Skia", configuration, "net8.0"), - Path.Combine("Uno.UI.Reference", configuration, "net8.0"), - Path.Combine("Uno.UI.Tests", configuration, "net8.0"), + + private const string TFM = "net8.0"; + + private static MetadataReference[] BuildUnoReferences(bool isAndroid) + { + string[] availableTargets = isAndroid + ? [Path.Combine("Uno.UI.netcoremobile", Configuration, $"{TFM}-android")] + : [ + Path.Combine("Uno.UI.Skia", Configuration, TFM), + Path.Combine("Uno.UI.Reference", Configuration, TFM), + Path.Combine("Uno.UI.Tests", Configuration, TFM), ]; - } var unoUIBase = Path.Combine( Path.GetDirectoryName(typeof(Given_DependencyObjectGenerator).Assembly.Location)!,