Skip to content

Commit eb7a6a6

Browse files
authored
[release/9.0.1xx][Mono.Android] Set API level properties when generating API Docs (#10052)
Commit 3a3beeb allows Mono.Android to be built for both API 35 and 36, while still marking API 36 as "unstable". The API docs update targets should explicitly pass the API level we want to build for to account for this and to allow us to generate docs for API level 36. The docs build also doesn't need to run the ApiCompat targets.
1 parent 7f4fd32 commit eb7a6a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Mono.Android/Mono.Android.targets

+3-1
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,15 @@
254254
<!-- Generate documentation using MDoc -->
255255
<Target Name="UpdateExternalDocumentation">
256256
<MSBuild Projects="$(MSBuildThisFileDirectory)Mono.Android.csproj"
257-
Properties="TargetFramework=$(DotNetTargetFramework);DocsExportOutput=$(BaseIntermediateOutputPath)Mono.Android.temp.xml"
257+
Properties="TargetFramework=$(DotNetTargetFramework);AndroidApiLevel=$(DocsApiLevel);AndroidPlatformId=$(DocsPlatformId);DocsExportOutput=$(BaseIntermediateOutputPath)Mono.Android.temp.xml"
258258
Targets="_UpdateExternalDocumentation;_RunMdoc;_ExportMsxDoc;_GenerateApiDocsDiff"
259259
/>
260260
</Target>
261261
<Target Name="_UpdateExternalDocumentation">
262262
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
263263
<ItemGroup>
264264
<_BuildProps Include="-p:TargetFramework=$(DotNetTargetFramework)" />
265+
<_BuildProps Include="-p:DisableApiCompatibilityCheck=True" />
265266
<_BuildProps Include="-p:IncludeAndroidJavadoc=True" />
266267
<_BuildProps Include="-p:AndroidApiLevel=$(DocsApiLevel)" />
267268
<_BuildProps Include="-p:AndroidPlatformId=$(DocsPlatformId)" />
@@ -276,6 +277,7 @@
276277
<!-- `mdoc fx-bootstrap` and `mdoc update` require the .NET framework version of mdoc, a mono install will be needed to run the RunMdoc target on macOS/Linux -->
277278
<Target Name="RunMdoc">
278279
<MSBuild Projects="$(MSBuildThisFileDirectory)Mono.Android.csproj"
280+
Properties="AndroidApiLevel=$(DocsApiLevel);AndroidPlatformId=$(DocsPlatformId)"
279281
Targets="_RunMdoc"
280282
/>
281283
</Target>

0 commit comments

Comments
 (0)