-
Notifications
You must be signed in to change notification settings - Fork 534
/
Copy pathXamarin.Android.Analysis.targets
82 lines (71 loc) · 2.92 KB
/
Xamarin.Android.Analysis.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
<!--
***********************************************************************************************
Xamarin.Android.Analysis.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).
Copyright (C) 2015 Xamarin. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
*******************************************
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')" />
<ItemGroup>
<!--
<XamarinProjectAnalysisTargets Include="ExampleTarget" />
-->
</ItemGroup>
<ItemGroup>
<XamarinPackageAnalysisTargets Include="CheckAbiAndMinSDK" />
</ItemGroup>
<!--
*******************************************
Project Analysis Targets Section
*******************************************
-->
<Target Name="CheckAbiAndMinSDK" DependsOnTargets="_GenerateJavaStubs;_ManifestMerger">
<XmlPeek
Condition="Exists('$(IntermediateOutputPath)android\AndroidManifest.xml')"
Namespaces="<Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' />"
XmlInputPath="$(IntermediateOutputPath)android\AndroidManifest.xml"
Query="/manifest/uses-sdk/@android:minSdkVersion" >
<Output TaskParameter="Result" ItemName="_MinSdkValue" />
</XmlPeek>
<ItemGroup>
<XamarinProjectAnalysisResult Include="XAA0001"
Condition="($(AndroidSupportedAbis.Contains('arm64-v8a')) Or $(AndroidSupportedAbis.Contains('x86_64'))) And '@(_MinSdkValue)' < '10'" >
<Category>Android</Category>
<Problem>
The minSdkVersion can not be less than 10 (2.3) when targeting arm64-v8a
</Problem>
<Fix>
Update the minSdkVersion in your app
</Fix>
</XamarinProjectAnalysisResult>
</ItemGroup>
</Target>
<!--
*******************************************
Package Analysis Targets Section
*******************************************
-->
<!--
*******************************************
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>