Commit cee5e72
authored
[Mono.Android] Add UpdateExternalDocumentation target (#5485)
Context: a7413a2
Context: #5200
Context: xamarin/android-api-docs#23
Context: https://review.docs.microsoft.com/en-us/engineering/projects/reference/dotnet/mdoc
Add a new `UpdateExternalDocumentation` target to
`src/Mono.Android/Mono.Android.csproj` which:
1. *Rebuilds* `src/Mono.Android` with
`$(IncludeAndroidJavadoc)`=True. This produces a
`Mono.Anroid.xml` file containing imported API-30 Javadoc.
On macOS, this *also* produces the log file
`src/Mono.Android/UpdateExternalDocumentation-{TIME}.binlog`,
which contains the build output for the rebuild.
2. Runs `mdoc update --import Mono.Android.xml --use-docid`,
updating the [**mdoc**(5) documentation][0] within
`external/android-api-docs/docs/Mono.Android/en`
The `--use-docid` flag is needed for integration with the
documentation infrastructure.
Usage:
msbuild /t:UpdateExternalDocumentation src/Mono.Android/Mono.Android.csproj
This process takes ~60 minutes on my machine.
Additionally, add a new `RunMdoc` target, which just runs the
`mdoc update --import…` command. This is useful for one-off testing.
The `UpdateExternalDocumentation` and `RunMdoc` targets also takes an
optional `$(DocTypeName)` MSBuild property, which is used to restrict
the types that `mdoc update` will update:
msbuild /p:DocTypeName=Java.Lang.Object /t:UpdateExternalDocumentation src/Mono.Android/Mono.Android.csproj
# -or-
msbuild /p:DocTypeName=Java.Lang.Object /t:RunMdoc src/Mono.Android/Mono.Android.csproj
Note: This uses the [mdoc NuGet package][1].
[0]: http://docs.go-mono.com/?link=man%3amdoc(5)
[1]: https://www.nuget.org/packages/mdoc/5.8.01 parent 1bb7602 commit cee5e72
2 files changed
+67
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
160 | | - | |
| 168 | + | |
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
| |||
260 | 268 | | |
261 | 269 | | |
262 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
263 | 319 | | |
0 commit comments