forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.ui.targets
47 lines (39 loc) · 2.32 KB
/
uno.ui.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceGeneratorBasePath Condition="'$(SourceGeneratorBasePath)'==''">..\</SourceGeneratorBasePath>
<UnoUIMSBuildTasksTargetPath Condition="'$(UnoUIMSBuildTasksTargetPath)'==''"></UnoUIMSBuildTasksTargetPath>
</PropertyGroup>
<Import Project="$(SourceGeneratorBasePath)Uno.UI.SourceGenerators.props" />
<Import Project="$(UnoUIMSBuildTasksTargetPath)Uno.UI.Tasks.targets" />
<Target Name="_UnoFeatureDefines"
BeforeTargets="BeforeCompile">
<!--
Defines Uno features.
Note to contributors: Adding a feature here allows for smoother upgrade
to a more recent version of uno. These constants are defined in the code
that uses Uno, so conditional compilation can be used to detect the presence
of breaking changes.
-->
<PropertyGroup>
<UnoDefineConstants>$(UnoDefineConstants);HAS_UNO</UnoDefineConstants>
<UnoDefineConstants>$(UnoDefineConstants);UNO_HAS_FRAMEWORKELEMENT_MEASUREOVERRIDE</UnoDefineConstants>
<UnoDefineConstants>$(UnoDefineConstants);UNO_HAS_NO_IDEPENDENCYOBJECT</UnoDefineConstants>
</PropertyGroup>
<!-- Merge the UnoDefineConstants with the existing constants -->
<CreateProperty Value="$(DefineConstants);$(UnoDefineConstants)">
<Output TaskParameter="Value" PropertyName="DefineConstants" />
</CreateProperty>
</Target>
<Target Name="ReplaceRefAssemblies" AfterTargets="_ResolveAssemblies" Condition="'$(AndroidApplication)'=='true'">
<!-- This is a workaround for https://github.com/xamarin/xamarin-android/issues/1162#issuecomment-359475008 -->
<ItemGroup>
<ResolvedAssembliesFixedWindows Include="@(ResolvedAssemblies->Replace('\ref\','\lib\'))" />
<ResolvedAssembliesFixedUnix Include="@(ResolvedAssemblies->Replace('/ref/','/lib/'))" />
<ResolvedAssembliesFixed Include="@(ResolvedAssembliesFixedWindows)" Condition="@(ResolvedAssembliesFixedWindows) != @(ResolvedAssemblies)" />
<ResolvedAssembliesFixed Include="@(ResolvedAssembliesFixedUnix)" Condition="@(ResolvedAssembliesFixedUnix) != @(ResolvedAssemblies)" />
<ResolvedAssemblies Condition="'@(ResolvedAssembliesFixed->Count())' > 0" Remove="@(ResolvedAssemblies)" />
<ResolvedAssemblies Include="@(ResolvedAssembliesFixed)" />
</ItemGroup>
</Target>
</Project>