|
75 | 75 | <!-- Pulls documentation from JavaDoc -->
|
76 | 76 | <PropertyGroup>
|
77 | 77 | <_JavaSourceUtilsJar>$(MicrosoftAndroidSdkOutDir)java-source-utils.jar</_JavaSourceUtilsJar>
|
78 |
| - <_AndroidStableSrcDir>$(AndroidSdkDirectory)\platforms\android-$(AndroidLatestStableApiLevel)\src</_AndroidStableSrcDir> |
| 78 | + <_AndroidSrcDir>$(AndroidSdkDirectory)\platforms\android-$(AndroidApiLevel)\src</_AndroidSrcDir> |
79 | 79 | <_AndroidJavadocXml>..\..\bin\Build$(Configuration)\android-javadoc.xml</_AndroidJavadocXml>
|
80 | 80 | </PropertyGroup>
|
81 | 81 |
|
82 | 82 | <Target Name="_BuildAndroidJavadocXml"
|
83 | 83 | Condition=" '$(IncludeAndroidJavadoc)' == 'True' "
|
84 | 84 | BeforeTargets="CoreCompile"
|
85 |
| - Inputs="$(MSBuildThisFile);$(_AndroidStableSrcDir)\source.properties;$(_JavaSourceUtilsJar)" |
| 85 | + Inputs="$(MSBuildThisFile);$(_AndroidSrcDir)\source.properties;$(_JavaSourceUtilsJar)" |
86 | 86 | Outputs="$(_AndroidJavadocXml)">
|
87 | 87 | <ItemGroup>
|
88 | 88 | <_Doclink Include="--doc-copyright" />
|
|
95 | 95 | <_Doclink Include="https://developer.android.com/" />
|
96 | 96 | </ItemGroup>
|
97 | 97 | <ItemGroup>
|
98 |
| - <_AndroidSources Include="$(_AndroidStableSrcDir)\android\**\*.java" /> |
99 |
| - <_AndroidSources Include="$(_AndroidStableSrcDir)\java\**\*.java" /> |
100 |
| - <_AndroidSources Include="$(_AndroidStableSrcDir)\javax\**\*.java" /> |
101 |
| - <_AndroidSources Include="$(_AndroidStableSrcDir)\org\**\*.java" /> |
102 |
| - <_AndroidSources Remove="$(_AndroidStableSrcDir)\**\*.annotated.java" /> |
| 98 | + <_AndroidSources Include="$(_AndroidSrcDir)\android\**\*.java" /> |
| 99 | + <_AndroidSources Include="$(_AndroidSrcDir)\java\**\*.java" /> |
| 100 | + <_AndroidSources Include="$(_AndroidSrcDir)\javax\**\*.java" /> |
| 101 | + <_AndroidSources Include="$(_AndroidSrcDir)\org\**\*.java" /> |
| 102 | + <_AndroidSources Remove="$(_AndroidSrcDir)\**\*.annotated.java" /> |
103 | 103 | </ItemGroup>
|
104 | 104 | <PropertyGroup>
|
105 | 105 | <_Filenames>$(IntermediateOutputPath)\java-sources.txt</_Filenames>
|
|
111 | 111 | />
|
112 | 112 | <ItemGroup>
|
113 | 113 | <_JSIArg Include="-v" />
|
114 |
| - <_JSIArg Include="--source "$(_AndroidStableSrcDir)"" /> |
| 114 | + <_JSIArg Include="--source "$(_AndroidSrcDir)"" /> |
115 | 115 | <_JSIArg Include="--output-javadoc "$(_AndroidJavadocXml)"" />
|
116 | 116 | <_JSIArg Include="@$(_Filenames)" />
|
117 | 117 | </ItemGroup>
|
|
289 | 289 | <Target Name="UpdateExternalDocumentation">
|
290 | 290 | <MSBuild Projects="$(MSBuildThisFileDirectory)Mono.Android.csproj"
|
291 | 291 | Properties="TargetFramework=monoandroid10"
|
292 |
| - Targets="_UpdateExternalDocumentation;_RunMdoc" |
| 292 | + Targets="_UpdateExternalDocumentation;_RunMdoc;_GenerateApiDocsDiff" |
293 | 293 | />
|
294 | 294 | </Target>
|
295 | 295 | <Target Name="_UpdateExternalDocumentation">
|
296 | 296 | <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
|
297 | 297 | <PropertyGroup>
|
298 |
| - <_Binlog>$(MSBuildThisFileDirectory)../../bin/Build$(Configuration)/UpdateExternalDocumentation-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss")).binlog</_Binlog> |
| 298 | + <_Binlog>$(MSBuildThisFileDirectory)../../bin/Build$(Configuration)/UpdateApiDocs-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss")).binlog</_Binlog> |
299 | 299 | </PropertyGroup>
|
| 300 | + <ItemGroup> |
| 301 | + <_BuildProps Include="-p:IncludeAndroidJavadoc=True" /> |
| 302 | + <_BuildProps Include="-p:TargetFramework=monoandroid10" /> |
| 303 | + <!-- Override these properties to generate docs against a specific API level --> |
| 304 | + <_BuildProps Include="-p:AndroidApiLevel=$(AndroidApiLevel)" /> |
| 305 | + <_BuildProps Include="-p:AndroidPlatformId=$(AndroidPlatformId)" /> |
| 306 | + <_BuildProps Include="-p:AndroidFrameworkVersion=$(AndroidFrameworkVersion)" /> |
| 307 | + </ItemGroup> |
300 | 308 | <Exec
|
301 |
| - Command="dotnet build -v:n -c $(Configuration) -p:IncludeAndroidJavadoc=True -bl:$(_Binlog)" |
| 309 | + Command=""$(DotNetPreviewTool)" build -v:n -c $(Configuration) -bl:$(_Binlog) @(_BuildProps, ' ')" |
302 | 310 | IgnoreStandardErrorWarningFormat="True"
|
303 | 311 | WorkingDirectory="$(MSBuildThisFileDirectory)"
|
304 | 312 | />
|
|
352 | 360 | WorkingDirectory="$(MSBuildThisFileDirectory)"
|
353 | 361 | />
|
354 | 362 | </Target>
|
355 |
| - |
| 363 | + |
| 364 | + <Target Name="_GenerateApiDocsDiff"> |
| 365 | + <PropertyGroup> |
| 366 | + <_DiffFile>$(XamarinAndroidSourcePath)bin/Build$(Configuration)/UpdateApiDocs$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss")).diff</_DiffFile> |
| 367 | + </PropertyGroup> |
| 368 | + <Exec |
| 369 | + Command="git diff --output="$(_DiffFile)"" |
| 370 | + WorkingDirectory="$(XamarinAndroidSourcePath)external/android-api-docs" |
| 371 | + /> |
| 372 | + </Target> |
| 373 | + |
356 | 374 | </Project>
|
0 commit comments