|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3 | 3 | <UsingTask AssemblyFile="$(PrepTasksAssembly)" TaskName="Xamarin.Android.BuildTools.PrepTasks.ReplaceFileContents" />
|
| 4 | + <UsingTask AssemblyFile="$(PrepTasksAssembly)" TaskName="Xamarin.Android.BuildTools.PrepTasks.Git" /> |
4 | 5 | <UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.CheckApiCompatibility" />
|
5 | 6 | <Import Project="..\..\build-tools\scripts\XAVersionInfo.targets" />
|
6 | 7 | <Import Project="..\..\bin\Build$(Configuration)\Mono.Android.Apis.projitems" Condition="Exists('..\..\bin\Build$(Configuration)\Mono.Android.Apis.projitems')"/>
|
|
292 | 293 | <DocsApiLevel Condition=" '$(DocsApiLevel)' == '' ">31</DocsApiLevel>
|
293 | 294 | <DocsPlatformId Condition=" '$(DocsPlatformId)' == '' ">31</DocsPlatformId>
|
294 | 295 | <DocsFxVersion Condition=" '$(DocsFxVersion)' == '' ">v12.0</DocsFxVersion>
|
295 |
| - <_Binlog>$(MSBuildThisFileDirectory)../../bin/Build$(Configuration)/UpdateApiDocs-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss")).binlog</_Binlog> |
| 296 | + <_LogPrefix>$(MSBuildThisFileDirectory)../../bin/Build$(Configuration)/UpdateApiDocs-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss"))</_LogPrefix> |
296 | 297 | </PropertyGroup>
|
297 | 298 |
|
298 | 299 | <!-- Generate documentation using MDoc -->
|
|
312 | 313 | <_BuildProps Include="-p:AndroidFrameworkVersion=$(DocsFxVersion)" />
|
313 | 314 | </ItemGroup>
|
314 | 315 | <Exec
|
315 |
| - Command=""$(DotNetPreviewTool)" build -v:n -c $(Configuration) -bl:$(_Binlog) @(_BuildProps, ' ')" |
| 316 | + Command=""$(DotNetPreviewTool)" build -v:n -c $(Configuration) -bl:$(_LogPrefix).binlog @(_BuildProps, ' ')" |
316 | 317 | IgnoreStandardErrorWarningFormat="True"
|
317 | 318 | WorkingDirectory="$(MSBuildThisFileDirectory)"
|
318 | 319 | />
|
|
365 | 366 | Command="$(ManagedRuntime) $(ManagedRuntimeArgs) $(_Mdoc) --debug update --use-docid --delete $(_Libdir) $(_ImportXml) $(_Output) $(_DocTypeArgs) $(_FxConfig) $(_Lang)"
|
366 | 367 | WorkingDirectory="$(MSBuildThisFileDirectory)"
|
367 | 368 | />
|
| 369 | + <!-- Ensure updated docs can also be exported to msxdoc format --> |
| 370 | + <Exec |
| 371 | + Command="$(ManagedRuntime) $(ManagedRuntimeArgs) $(_Mdoc) --debug export-msxdoc -o "$(_LogPrefix)-Export.xml" "$(XamarinAndroidSourcePath)external/android-api-docs/docs/Mono.Android/en/"" |
| 372 | + WorkingDirectory="$(MSBuildThisFileDirectory)" |
| 373 | + /> |
368 | 374 | </Target>
|
369 | 375 |
|
370 | 376 | <Target Name="_GenerateApiDocsDiff">
|
371 |
| - <PropertyGroup> |
372 |
| - <_DiffFile>$(XamarinAndroidSourcePath)bin/Build$(Configuration)/UpdateApiDocs$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss")).diff</_DiffFile> |
373 |
| - </PropertyGroup> |
374 |
| - <Exec |
375 |
| - Command="git diff --output="$(_DiffFile)"" |
| 377 | + <Git |
| 378 | + Arguments="add ." |
| 379 | + WorkingDirectory="$(XamarinAndroidSourcePath)external/android-api-docs" |
| 380 | + ToolPath="$(GitToolPath)" |
| 381 | + ToolExe="$(GitToolExe)" |
| 382 | + /> |
| 383 | + <Git |
| 384 | + Arguments="diff --cached --output="$(_LogPrefix).diff"" |
376 | 385 | WorkingDirectory="$(XamarinAndroidSourcePath)external/android-api-docs"
|
| 386 | + ToolPath="$(GitToolPath)" |
| 387 | + ToolExe="$(GitToolExe)" |
377 | 388 | />
|
378 | 389 | </Target>
|
379 | 390 |
|
|
0 commit comments