Skip to content

Commit

Permalink
Bump to mono/api-doc-tools@97c1778d [mdoc 5.8.9.2] (#7175)
Browse files Browse the repository at this point in the history
Context: mono/api-doc-tools@039a030
Context: mono/api-doc-tools#638

Changes: mono/api-doc-tools@mdoc-5.8.5...mdoc-5.8.9.2

Updates [mdoc][0] to the latest release, and add a parameter to
`azure-pipelines-apidocs.yaml` to allow any version of mdoc to be
used when generating docs.

[0]: https://www.nuget.org/packages/mdoc
  • Loading branch information
pjcollins authored Jul 18, 2022
1 parent 186a9fc commit db02ff5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<SystemCollectionsImmutableVersion>1.7.1</SystemCollectionsImmutableVersion>
<XliffTasksVersion>1.0.0-beta.20420.1</XliffTasksVersion>
<ELFSharpVersion>2.13.1</ELFSharpVersion>
<MdocPackageVersion Condition=" '$(MdocPackageVersion)' == '' ">5.8.9.2</MdocPackageVersion>
</PropertyGroup>

<!-- Properties to help us run managed assemblies on various runtimes.
Expand Down
41 changes: 37 additions & 4 deletions build-tools/automation/azure-pipelines-apidocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,35 @@ parameters:
- name: apiLevel
displayName: AndroidApiLevel property value
type: string
default: 31
default: default

- name: platformId
displayName: AndroidPlatformId property value
type: string
default: 31
default: default

- name: frameworkVersion
displayName: AndroidFrameworkVersion property value
type: string
default: v12.0
default: default

- name: mdocVersion
displayName: MdocPackageVersion property value
type: string
default: default

# Global variables
variables:
- template: yaml-templates/variables.yaml
- name: DocsApiLevelArg
value: ''
- name: DocsPlatformIdArg
value: ''
- name: DocsFxVersionArg
value: ''
- name: MdocPackageVersionArg
value: ''


stages:
- stage: mac_build
Expand All @@ -48,6 +62,23 @@ stages:
- script: echo "##vso[task.setvariable variable=JI_JAVA_HOME]$HOME/android-toolchain/jdk-11"
displayName: set JI_JAVA_HOME

# Set MSBuild property overrides if parameters are set
- ${{ if ne(parameters.apiLevel, 'default') }}:
- script: echo "##vso[task.setvariable variable=DocsApiLevelArg]-p:DocsApiLevel=${{ parameters.apiLevel }}"
displayName: set DocsApiLevelArg

- ${{ if ne(parameters.platformId, 'default') }}:
- script: echo "##vso[task.setvariable variable=DocsPlatformIdArg]-p:DocsPlatformId=${{ parameters.platformId }}"
displayName: set DocsPlatformIdArg

- ${{ if ne(parameters.frameworkVersion, 'default') }}:
- script: echo "##vso[task.setvariable variable=DocsFxVersionArg]-p:DocsFxVersion=${{ parameters.frameworkVersion }}"
displayName: set DocsFxVersionArg

- ${{ if ne(parameters.mdocVersion, 'default') }}:
- script: echo "##vso[task.setvariable variable=MdocPackageVersionArg]-p:MdocPackageVersion=${{ parameters.mdocVersion }}"
displayName: set MdocPackageVersionArg

- template: yaml-templates/use-dot-net.yaml

- task: NuGetAuthenticate@0
Expand All @@ -64,7 +95,9 @@ stages:
workingDirectory: $(Build.SourcesDirectory)
displayName: make prepare

- script: make update-api-docs CONFIGURATION=$(XA.Build.Configuration) MSBUILD_ARGS='-p:DocsApiLevel=${{ parameters.apiLevel }} -p:DocsPlatformId=${{ parameters.platformId }} -p:DocsFxVersion=${{ parameters.frameworkVersion }}'
- script: >-
make update-api-docs CONFIGURATION=$(XA.Build.Configuration)
MSBUILD_ARGS='$(DocsApiLevelArg) $(DocsPlatformIdArg) $(DocsFxVersionArg) $(MdocPackageVersionArg)'
workingDirectory: $(Build.SourcesDirectory)
displayName: make update-api-docs
Expand Down
2 changes: 1 addition & 1 deletion src/Mono.Android/Mono.Android.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="mdoc"
Version="5.8.5"
Version="$(MdocPackageVersion)"
GeneratePathProperty="True"
ReferenceOutputAssembly="False"
SkipGetTargetFrameworkProperties="True"
Expand Down

0 comments on commit db02ff5

Please sign in to comment.