-
Notifications
You must be signed in to change notification settings - Fork 528
/
Xamarin.Android.Bindings.ClassParse.targets
97 lines (86 loc) · 4.12 KB
/
Xamarin.Android.Bindings.ClassParse.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
<!--
***********************************************************************************************
Xamarin.Android.Bindings.ClassParse.targets
This file contains MSBuild targets used when $(AndroidClassParser) is 'class-parse'.
This file is only used by binding projects.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.Android.Tasks.ClassParse" AssemblyFile="Xamarin.Android.Build.Tasks.dll" />
<Target Name="_ExportJarToXml"
DependsOnTargets="_ExtractJavadocsFromJavaSourceJars"
Inputs="@(EmbeddedJar);@(EmbeddedReferenceJar);@(InputJar);@(ReferenceJar);@(_AndroidMSBuildAllProjects)"
Outputs="$(ApiOutputFile)">
<ItemGroup>
<_AndroidDocumentationPath Include="@(_JavaSourceJavadocXml)" />
<_AndroidDocumentationPath Include="@(JavaDocIndex->'%(RootDir)\%(Directory)')" />
<_AndroidDocumentationPath Include="$(JavaDocPaths)" />
<_AndroidDocumentationPath Include="$(Java7DocPaths)" />
<_AndroidDocumentationPath Include="$(Java8DocPaths)" />
<_AndroidDocumentationPath Include="$(DroidDocPaths)" />
<_AndroidDocumentationPath Include="@(JavaDocJar->'$(IntermediateOutputPath)javadocs\%(FileName)')" />
</ItemGroup>
<ClassParse
OutputFile="$(ApiOutputFile).class-parse"
SourceJars="@(EmbeddedJar);@(InputJar)"
DocumentationPaths="@(_AndroidDocumentationPath)"
NetCoreRoot="$(NetCoreRoot)"
ToolPath="$(MonoAndroidToolsDirectory)"
ToolExe="$(ClassParseToolExe)"
/>
<BindingsGenerator
OnlyRunXmlAdjuster="true"
XmlAdjusterOutput="$(ApiOutputFile)"
OutputDirectory="$(GeneratedOutputPath)src"
AndroidApiLevel="$(_AndroidApiLevel)"
ApiXmlInput="$(ApiOutputFile).class-parse"
ReferencedManagedLibraries="@(ReferencePath);@(ReferenceDependencyPaths)"
MonoAndroidFrameworkDirectories="$(_XATargetFrameworkDirectories)"
NetCoreRoot="$(NetCoreRoot)"
ToolPath="$(MonoAndroidToolsDirectory)"
ToolExe="$(BindingsGeneratorToolExe)"
Nullable="$(Nullable)"
UseJavaLegacyResolver="$(_AndroidUseJavaLegacyResolver)"
/>
<ItemGroup>
<!-- Created by <ClassParse /> -->
<FileWrites Include="$(IntermediateOutputPath)class-parse.rsp" />
<!-- Created by <BindingGenerator /> -->
<FileWrites Condition="Exists ('$(IntermediateOutputPath)java-resolution-report.log')" Include="$(IntermediateOutputPath)java-resolution-report.log" />
</ItemGroup>
</Target>
<Target Name="_GetJavaSourceJarJavadocFiles"
Condition=" '$(_UseLegacyJavadocImport)' != 'True' And '@(JavaSourceJar->Count())' != '0' ">
<ComputeHash
CopyMetadata="True"
Source="@(JavaSourceJar)">
<Output TaskParameter="Output" ItemName="_JavaSourceJarHashes" />
</ComputeHash>
<ItemGroup>
<_JavaSourceJavadocXml Include="@(_JavaSourceJarHashes->'$(IntermediateOutputPath)javadoc-%(Filename)-%(Hash).xml')" />
</ItemGroup>
</Target>
<Target Name="_ExtractJavadocsFromJavaSourceJars"
Condition=" '$(_UseLegacyJavadocImport)' != 'True' And '@(JavaSourceJar->Count())' != '0' "
DependsOnTargets="_GetJavaSourceJarJavadocFiles"
Inputs="@(JavaSourceJar)"
Outputs="@(_JavaSourceJavadocXml)">
<JavaSourceUtils
ContinueOnError="True"
JavaSourceUtilsJar="$(AndroidJavaSourceUtilsJar)"
InputFiles="%(_JavaSourceJavadocXml.OriginalItemSpec)"
JavadocCopyrightFile="%(_JavaSourceJavadocXml.CopyrightFile)"
JavadocUrlPrefix="%(_JavaSourceJavadocXml.UrlPrefix)"
JavadocUrlStyle="%(_JavaSourceJavadocXml.UrlStyle)"
JavadocDocRootUrl="%(_JavaSourceJavadocXml.DocRootUrl)"
JavaMaximumHeapSize="$(JavaMaximumHeapSize)"
JavaOptions="$(JavaOptions)"
JavaSdkDirectory="$(_JavaSdkDirectory)"
OutputJavadocXml="%(_JavaSourceJavadocXml.Identity)"
References="@(JavaSourceJar)"
/>
<ItemGroup>
<FileWrites Include="@(_JavaSourceJavadocXml)" />
</ItemGroup>
</Target>
</Project>