-
Notifications
You must be signed in to change notification settings - Fork 534
/
Copy pathXamarin.Android.Bindings.targets
executable file
·176 lines (144 loc) · 8.49 KB
/
Xamarin.Android.Bindings.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!--
***********************************************************************************************
Xamarin.Android.Bindings.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file imports the version- and platform-specific targets for the project importing
this file. This file also defines targets to produce an error if the specified targets
file does not exist, but the project is built anyway (command-line or IDE build).
This is the entry point for "legacy" binding projects.
This file is not imported by .NET 5 projects.
Copyright (C) 2012 Xamarin Inc. All rights reserved.
***********************************************************************************************
-->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.Android.Tasks.AndroidWarning" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<UsingTask TaskName="Xamarin.Android.Tasks.ComputeHash" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<!--
*******************************************
Extensibility hook that allows VS to
provide extra behavior without modifying
the core targets.
*******************************************
-->
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets"
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/>
<!--
*******************************************
Common Properties
*******************************************
-->
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.Common.props"
Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Android.Common.props')" />
<PropertyGroup>
<AndroidUseLatestPlatformSdk Condition="'$(AndroidUseLatestPlatformSdk)' == ''">False</AndroidUseLatestPlatformSdk>
<TargetFrameworkIdentifier>MonoAndroid</TargetFrameworkIdentifier>
<MonoAndroidVersion>v5.0</MonoAndroidVersion>
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == '' And '$(AndroidUseLatestPlatformSdk)' == 'False'">v5.0</TargetFrameworkVersion>
<LangVersion Condition=" '$(LangVersion)' == '' ">8.0</LangVersion>
<AndroidClassParser Condition=" '$(AndroidClassParser)' == '' ">jar2xml</AndroidClassParser>
<AndroidCodegenTarget Condition=" '$(AndroidCodegenTarget)' == '' ">XAJavaInterop1</AndroidCodegenTarget>
<_AndroidIsBindingProject>True</_AndroidIsBindingProject>
</PropertyGroup>
<!-- Convert legacy DIM preview flag into new Enable* flags -->
<PropertyGroup Condition="'$(_EnableInterfaceMembers)' == 'True'">
<AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods Condition=" '$(AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods)' == '' ">True</AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>
<AndroidBoundInterfacesContainTypes Condition=" '$(AndroidBoundInterfacesContainTypes)' == '' ">True</AndroidBoundInterfacesContainTypes>
<AndroidBoundInterfacesContainConstants Condition=" '$(AndroidBoundInterfacesContainConstants)' == '' ">True</AndroidBoundInterfacesContainConstants>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<_AndroidStampDirectory>$(IntermediateOutputPath)stamp\</_AndroidStampDirectory>
<!-- Do not resolve from the GAC under any circumstances in Mobile -->
<AssemblySearchPaths>$([System.String]::Copy('$(AssemblySearchPaths)').Replace('{GAC}',''))</AssemblySearchPaths>
<AssemblySearchPaths Condition="'$(MSBuildRuntimeVersion)' != ''">$(AssemblySearchPaths.Split(';'))</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<GetReferenceAssemblyPathsDependsOn>_SetLatestTargetFrameworkVersion</GetReferenceAssemblyPathsDependsOn>
<AndroidSequencePointsMode Condition=" '$(AndroidSequencePointsMode)' == ''">None</AndroidSequencePointsMode>
<!-- Prevent warnings about assembly version conflicts -->
<AutoUnifyAssemblyReferences>True</AutoUnifyAssemblyReferences>
<AutoGenerateBindingRedirects>False</AutoGenerateBindingRedirects>
<!-- The .NET SGEN tool cannot process Xamarin.Android assemblies because
our mscorlib.dll isn't properly signed, as far as its concerned.
Disable generation to avoid "bizarre" build errors. -->
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<Target Name="AndroidPrepareForBuild" DependsOnTargets="GetReferenceAssemblyPaths" />
<!-- Warn about deprecated configurations.
Do it here because we want them to appear on every build,
even if we aren't rerunning generator -->
<Target Name="_WarnAboutDeprecatedConfigurations">
<AndroidWarning Code="XA4231"
ResourceName="XA4231"
FormatArguments="$(AndroidClassParser)"
Condition=" '$(AndroidClassParser)' != 'class-parse' "
/>
<AndroidWarning Code="XA4232"
ResourceName="XA4232"
FormatArguments="$(AndroidCodegenTarget)"
Condition=" '$(AndroidCodegenTarget)' != 'XAJavaInterop1' "
/>
</Target>
<!-- Find all the needed SDKs -->
<Target Name="_ResolveMonoAndroidSdks" DependsOnTargets="GetReferenceAssemblyPaths;_WarnAboutDeprecatedConfigurations">
<Error Text="Could not locate Android SDK." Condition="'$(_AndroidSdkDirectory)'==''" />
<Error Text="Could not locate Java 6 or 7 SDK. (Download from http://www.oracle.com/technetwork/java/javase/downloads.)" Condition="'$(_JavaSdkDirectory)'==''" />
<CreateProperty Value="$(_AndroidNdkDirectory)\">
<Output TaskParameter="Value" PropertyName="_AndroidNdkDirectory"
Condition="!HasTrailingSlash('$(_AndroidNdkDirectory)')" />
</CreateProperty>
<CreateProperty Value="$(_AndroidSdkDirectory)\">
<Output TaskParameter="Value" PropertyName="_AndroidSdkDirectory"
Condition="!HasTrailingSlash('$(_AndroidSdkDirectory)')" />
</CreateProperty>
<CreateProperty Value="$(_JavaSdkDirectory)\">
<Output TaskParameter="Value" PropertyName="_JavaSdkDirectory"
Condition="!HasTrailingSlash('$(_JavaSdkDirectory)')" />
</CreateProperty>
<CreateProperty Value="$(_JavaSdkDirectory)bin">
<Output TaskParameter="Value" PropertyName="JavaToolPath"
Condition="'$(JavaToolPath)' == ''"
/>
</CreateProperty>
<Message Text="MonoAndroid Tools: $(_MonoAndroidToolsDirectory)"/>
<Message Text="Android NDK: $(_AndroidNdkDirectory)"/>
<Message Text="Android SDK: $(_AndroidSdkDirectory)"/>
<Message Text="Java SDK: $(_JavaSdkDirectory)"/>
<Message Text="Android Platform API level: $(_AndroidApiLevel)"/>
<Message Text="TargetFrameworkVersion: $(_TargetFrameworkVersion)"/>
<CreateProperty Value="$(MonoAndroidToolsDirectory)\java-source-utils.jar">
<Output TaskParameter="Value" PropertyName="AndroidJavaSourceUtilsJar"
Condition=" '$(AndroidJavaSourceUtilsJar)' == '' "
/>
</CreateProperty>
<!-- Misc paths -->
<CreateProperty Value="$(_AndroidSdkDirectory)tools\">
<Output TaskParameter="Value" PropertyName="_AndroidToolsDirectory"/>
</CreateProperty>
<CreateProperty Value="$(_AndroidSdkDirectory)platform-tools\">
<Output TaskParameter="Value" PropertyName="_AndroidPlatformToolsDirectory"/>
</CreateProperty>
</Target>
<Import Project="Xamarin.Android.AvailableItems.targets" />
<Import Project="Xamarin.Android.Bindings.Core.targets" />
<Import Project="Xamarin.Android.Bindings.ClassParse.targets" Condition=" '$(AndroidClassParser)' == 'class-parse' " />
<Import Project="Xamarin.Android.Bindings.JarToXml.targets" Condition=" '$(AndroidClassParser)' == 'jar2xml' " />
<Import Project="Xamarin.Android.DesignTime.targets" />
<Import Project="Xamarin.Android.Bindings.Documentation.targets" />
<Import Project="Xamarin.Android.EmbeddedResource.targets" />
<Import Project="Xamarin.Android.PCLSupport.targets" />
<Import Project="Xamarin.Android.Tooling.targets" />
<Import Project="Xamarin.Android.Legacy.targets" />
<!--
*******************************************
Extensibility hook that allows VS to
provide extra behavior without modifying
the core targets.
*******************************************
-->
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets"
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets')"/>
</Project>