-
Notifications
You must be signed in to change notification settings - Fork 564
[Mono.Android] Add UpdateExternalDocumentation target #5485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
63f78b7
72f26f0
583196d
0cac62b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,14 @@ | |
| <ItemGroup> | ||
| <Compile Include="$(IntermediateOutputPath)AssemblyInfo.cs" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="mdoc" | ||
| PackageVersion="5.8.0" | ||
| GeneratePathProperty="True" | ||
| ReferenceOutputAssembly="False" | ||
| SkipGetTargetFrameworkProperties="True" | ||
| /> | ||
| </ItemGroup> | ||
| <Target Name="_BuildJavaInterop" | ||
| BeforeTargets="BeforeResolveReferences" | ||
| Condition=" '$(TargetFramework)' == 'monoandroid10' " | ||
|
|
@@ -157,7 +165,7 @@ | |
| <_TypeMap>--type-map-report=$(IntermediateOutputPath)mcw\type-mapping.txt</_TypeMap> | ||
| <_Api>$(IntermediateOutputPath)mcw\api.xml</_Api> | ||
| <_Dirs>--enumdir=$(IntermediateOutputPath)mcw</_Dirs> | ||
| <_WithJavadocXml Condition=" '$(IncludeAndroidJavadoc)' == 'True' ">--doc-comment-verbosity=$(AndroidJavadocVerbosity) "--with-javadoc-xml=$(_AndroidJavadocXml)"</_WithJavadocXml> | ||
| <_WithJavadocXml Condition=" '$(IncludeAndroidJavadoc)' == 'True' ">"--doc-comment-verbosity=$(AndroidJavadocVerbosity)" "--with-javadoc-xml=$(_AndroidJavadocXml)"</_WithJavadocXml> | ||
| <_FullIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)'))</_FullIntermediateOutputPath> | ||
| <_LangFeatures>--lang-features=nullable-reference-types</_LangFeatures> | ||
| <_LangFeatures Condition="$(AndroidApiLevel) >= 30">$(_LangFeatures),default-interface-methods,nested-interface-types,interface-constants</_LangFeatures> | ||
|
|
@@ -260,4 +268,37 @@ | |
| <FileWrites Include="$(IntermediateOutputPath)CheckApiCompatibility.stamp" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <Target Name="UpdateExternalDocumentation"> | ||
| <MSBuild Projects="$(MSBuildThisFileDirectory)Mono.Android.csproj" | ||
| Properties="TargetFramework=monoandroid10" | ||
| Targets="_UpdateExternalDocumentation" | ||
| /> | ||
| </Target> | ||
| <Target Name="_UpdateExternalDocumentation"> | ||
| <Exec | ||
| Command="git clean -xdf obj" | ||
| WorkingDirectory="$(MSBuildThisFileDirectory)" | ||
| /> | ||
| <PropertyGroup> | ||
| <_Binlog>UpdateExternalDocumentation-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss")).binlog</_Binlog> | ||
| </PropertyGroup> | ||
| <Exec | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pjcollins: any reason to treat macOS & Windows differently here? Why not use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mentioned this briefly in the comment above -- using Exec over MSBuild allows us to automatically capture a binlog for each Mono.Android build, I can move it to use MSBuild for both if we want though |
||
| Command="msbuild /restore /p:IncludeAndroidJavadoc=True /bl:$(_Binlog)" | ||
| IgnoreStandardErrorWarningFormat="True" | ||
| WorkingDirectory="$(MSBuildThisFileDirectory)" | ||
| /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the intent here was to make sure we always capture a unique binlog from the output. I've kept this for non windows platforms, but updated this target to use |
||
| <PropertyGroup> | ||
| <_Mdoc Condition=" '$(Pkgmdoc)' != '' ">"$(Pkgmdoc)/tools/mdoc.exe"</_Mdoc> | ||
jonpryor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <_Libdir>-L "$(OutputPath)../v1.0"</_Libdir> | ||
| <_AssemblyBasename>$(OutputPath)Mono.Android</_AssemblyBasename> | ||
| <_ImportXml>-i "$(_AssemblyBasename).xml"</_ImportXml> | ||
| <_Assembly>"$(_AssemblyBasename).dll"</_Assembly> | ||
| <_Output>-o "$(MSBuildThisFileDirectory)../../external/android-api-docs/docs/Mono.Android/en"</_Output> | ||
| </PropertyGroup> | ||
| <Exec | ||
| Command="$(ManagedRuntime) $(ManagedRuntimeArgs) $(_Mdoc) --debug update --use-docid --delete $(_Libdir) $(_ImportXml) $(_Output) $(_Assembly)" | ||
| WorkingDirectory="$(MSBuildThisFileDirectory)" | ||
| /> | ||
| </Target> | ||
| </Project> | ||
Uh oh!
There was an error while loading. Please reload this page.