Skip to content

Commit

Permalink
Merge branch 'main' of github.com:googleapis/java-docfx-doclet into u…
Browse files Browse the repository at this point in the history
…pdateVersion
  • Loading branch information
alicejli committed Feb 21, 2024
2 parents 74c9a31 + 1f3ac62 commit 910ffa8
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 35 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin
- run: mvn -B -ntp install -DskipTests

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin
- run: mvn -B -ntp test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
Expand Down
14 changes: 7 additions & 7 deletions third_party/docfx-doclet-143274/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

## JavaDoc Doclet for DocFX

[![Build status](https://apidrop.visualstudio.com/Toolshed/_apis/build/status/Toolshed-Maven-CI)](https://apidrop.visualstudio.com/Toolshed/_build/latest?definitionId=1633)

This doclet is designed to produce a YAML representation of the Javadoc-generated documentation, that can be integrated into [DocFX](https://dotnet.github.io/docfx/).
It contains some Google-specific configurations to render pages on cloud.google.com.
The latest version of this doclet has been updated to be run with Java 17. It should work with Java 11 to generate Yaml files; however, the unit tests within this repo will fail.

## Getting started

The easiest way is to just get the JAR files directly from our [releases](https://github.com/dendeli-msft/docfx-doclet/releases).
This repo is a fork off of: [https://github.com/docascode/docfx-doclet](https://github.com/dendeli-msft/docfx-doclet/releases).

Alternatively, you can clone the repository and build it with the help of Maven. You can do so by calling:
You can clone this repository and build it with the help of Maven. You can do so by calling:

```bash
mvn compile
Expand Down Expand Up @@ -38,7 +38,7 @@ To cut a new release of the doclet for updated Cloud RAD content, do the followi

`git push origin v1.<minor>.<patch>`

3) Update the `publish_javadoc11.sh` script within g3 to use the latest version of the doclet.
3) Update the `publish_javadoc17.sh` script within g3 to use the latest version of the doclet.

## Usage

Expand All @@ -50,7 +50,7 @@ When there is an existing java project where Maven is used as a build tool, one
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<version>3.5.0</version>
<configuration>
<doclet>com.microsoft.doclet.DocFxDoclet</doclet>
<docletArtifact>
Expand Down Expand Up @@ -97,7 +97,7 @@ One can execute the `javadoc` command with the command line parameters:
```bash
javadoc \
-encoding UTF-8 \
-docletpath ./target/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies.jar \
-docletpath ./target/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies.jar \ # Update the version here to the doclet version you want to use
-doclet com.microsoft.doclet.DocFxDoclet \
-classpath <list of jar with dependencies> \
-sourcepath ./src/test/java \
Expand Down
25 changes: 12 additions & 13 deletions third_party/docfx-doclet-143274/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<jackson.version>2.15.3</jackson.version>
<apache.commons-lang.version>3.13.0</apache.commons-lang.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<jackson.version>2.16.1</jackson.version>
<apache.commons-lang.version>3.14.0</apache.commons-lang.version>
<apache.commons-collections.version>4.4</apache.commons-collections.version>
<apache.commons-io.version>2.14.0</apache.commons-io.version>
<apache.commons-text.version>1.10.0</apache.commons-text.version>
<apache.commons-io.version>2.15.1</apache.commons-io.version>
<apache.commons-text.version>1.11.0</apache.commons-text.version>
<remark.version>1.1.0</remark.version>
</properties>

Expand All @@ -26,7 +25,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.12.1</version>
<configuration>
<!-- Show build warnings in detail -->
<compilerArgument>-Xlint:unchecked</compilerArgument>
Expand Down Expand Up @@ -59,7 +58,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.3</version>
<configuration>
<doclet>com.microsoft.doclet.DocFxDoclet</doclet>
<docletArtifact>
Expand Down Expand Up @@ -106,7 +105,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.18.1</version>
<version>1.20.0</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -118,7 +117,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.27.0</version>
<version>26.32.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -159,12 +158,12 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.16.1</version>
<version>1.17.2</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
<version>33.0.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public StubPackageToc() {
visibleCategories.put(STUBS, new ArrayList<>());
visibleCategories.put(SETTINGS, new ArrayList<>());
visibleCategories.put(CALLABLE_FACTORIES, new ArrayList<>());
visibleCategories.put(UNCATEGORIZED, new ArrayList<>());
}

public void addStub(TocItem tocItem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public void testFilesGeneration() throws IOException {

assertEquals(
"Unexpected amount of lines in file " + generatedFilePath,
generatedFileLines.length,
expectedFileLines.length);
expectedFileLines.length,
generatedFileLines.length);

for (int i = 0; i < generatedFileLines.length; i++) {
assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ items:
- "java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)"
- "java.lang.Enum.clone()"
- "java.lang.Enum.compareTo(E)"
- "java.lang.Enum.describeConstable()"
- "java.lang.Enum.equals(java.lang.Object)"
- "java.lang.Enum.finalize()"
- "java.lang.Enum.getDeclaringClass()"
Expand Down Expand Up @@ -195,6 +196,11 @@ references:
name: "Enum.finalize()"
nameWithType: "Enum.finalize()"
fullName: "java.lang.Enum.finalize()"
- uid: "java.lang.Enum.describeConstable()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#describeConstable--"
name: "Enum.describeConstable()"
nameWithType: "Enum.describeConstable()"
fullName: "java.lang.Enum.describeConstable()"
- uid: "java.lang.Object.notifyAll()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--"
name: "Object.notifyAll()"
Expand Down Expand Up @@ -267,4 +273,4 @@ references:
- uid: "T>valueOf(java.lang.Class"
name: "T>valueOf(Class"
nameWithType: "T>valueOf(Class"
fullName: "T>valueOf(java.lang.Class"
fullName: "T>valueOf(java.lang.Class"
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ items:
- "com.google.api.gax.rpc.ClientSettings.Builder.setInternalHeaderProvider(com.google.api.gax.rpc.HeaderProvider)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setQuotaProjectId(java.lang.String)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setTransportChannelProvider(com.google.api.gax.rpc.TransportChannelProvider)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setUniverseDomain(java.lang.String)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setWatchdogCheckInterval(org.threeten.bp.Duration)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setWatchdogProvider(com.google.api.gax.rpc.WatchdogProvider)"
- "com.google.api.gax.rpc.ClientSettings.Builder.toString()"
Expand Down Expand Up @@ -1408,6 +1409,11 @@ references:
name: "ClientSettings.Builder.setQuotaProjectId(String)"
nameWithType: "ClientSettings.Builder.setQuotaProjectId(String)"
fullName: "com.google.api.gax.rpc.ClientSettings.Builder.setQuotaProjectId(java.lang.String)"
- uid: "com.google.api.gax.rpc.ClientSettings.Builder.setUniverseDomain(java.lang.String)"
isExternal: true
name: "ClientSettings.Builder.setUniverseDomain(String)"
nameWithType: "ClientSettings.Builder.setUniverseDomain(String)"
fullName: "com.google.api.gax.rpc.ClientSettings.Builder.setUniverseDomain(java.lang.String)"
- uid: "com.google.api.gax.rpc.ClientSettings.Builder.getCredentialsProvider()"
isExternal: true
name: "ClientSettings.Builder.getCredentialsProvider()"
Expand Down Expand Up @@ -1602,4 +1608,4 @@ references:
- uid: "?,?>,java.lang.Void>)"
name: "?,?>,Void>)"
nameWithType: "?,?>,Void>)"
fullName: "?,?>,java.lang.Void>)"
fullName: "?,?>,java.lang.Void>)"
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ items:
- "com.google.api.gax.rpc.ClientSettings.getQuotaProjectId()"
- "com.google.api.gax.rpc.ClientSettings.getStubSettings()"
- "com.google.api.gax.rpc.ClientSettings.getTransportChannelProvider()"
- "com.google.api.gax.rpc.ClientSettings.getUniverseDomain()"
- "com.google.api.gax.rpc.ClientSettings.getWatchdogCheckInterval()"
- "com.google.api.gax.rpc.ClientSettings.getWatchdogProvider()"
- "com.google.api.gax.rpc.ClientSettings.toString()"
Expand Down Expand Up @@ -1492,6 +1493,11 @@ references:
name: "Object.wait(long,int)"
nameWithType: "Object.wait(long,int)"
fullName: "java.lang.Object.wait(long,int)"
- uid: "com.google.api.gax.rpc.ClientSettings.getUniverseDomain()"
isExternal: true
name: "ClientSettings.getUniverseDomain()"
nameWithType: "ClientSettings.getUniverseDomain()"
fullName: "com.google.api.gax.rpc.ClientSettings.getUniverseDomain()"
- uid: "com.google.api.gax.rpc.ClientSettings.getHeaderProvider()"
isExternal: true
name: "ClientSettings.getHeaderProvider()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ items:
- "java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)"
- "java.lang.Enum.clone()"
- "java.lang.Enum.compareTo(E)"
- "java.lang.Enum.describeConstable()"
- "java.lang.Enum.equals(java.lang.Object)"
- "java.lang.Enum.finalize()"
- "java.lang.Enum.getDeclaringClass()"
Expand Down Expand Up @@ -287,6 +288,11 @@ references:
name: "Enum.finalize()"
nameWithType: "Enum.finalize()"
fullName: "java.lang.Enum.finalize()"
- uid: "java.lang.Enum.describeConstable()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#describeConstable--"
name: "Enum.describeConstable()"
nameWithType: "Enum.describeConstable()"
fullName: "java.lang.Enum.describeConstable()"
- uid: "java.lang.Object.notifyAll()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--"
name: "Object.notifyAll()"
Expand Down Expand Up @@ -359,4 +365,4 @@ references:
- uid: "T>valueOf(java.lang.Class"
name: "T>valueOf(Class"
nameWithType: "T>valueOf(Class"
fullName: "T>valueOf(java.lang.Class"
fullName: "T>valueOf(java.lang.Class"
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ items:
- "com.google.protobuf.GeneratedMessageV3.hasOneof(com.google.protobuf.Descriptors.OneofDescriptor)"
- "com.google.protobuf.GeneratedMessageV3.internalGetFieldAccessorTable()"
- "com.google.protobuf.GeneratedMessageV3.internalGetMapField(int)"
- "com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)"
- "com.google.protobuf.GeneratedMessageV3.isInitialized()"
- "com.google.protobuf.GeneratedMessageV3.isStringEmpty(java.lang.Object)"
- "com.google.protobuf.GeneratedMessageV3.makeExtensionsImmutable()"
Expand Down Expand Up @@ -977,6 +978,11 @@ references:
name: "GeneratedMessageV3.getParserForType()"
nameWithType: "GeneratedMessageV3.getParserForType()"
fullName: "com.google.protobuf.GeneratedMessageV3.getParserForType()"
- uid: "com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)"
isExternal: true
name: "GeneratedMessageV3.internalGetMapFieldReflection(int)"
nameWithType: "GeneratedMessageV3.internalGetMapFieldReflection(int)"
fullName: "com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)"
- uid: "com.google.protobuf.GeneratedMessageV3.getRepeatedFieldCount(com.google.protobuf.Descriptors.FieldDescriptor)"
isExternal: true
name: "GeneratedMessageV3.getRepeatedFieldCount(Descriptors.FieldDescriptor)"
Expand Down Expand Up @@ -1250,4 +1256,4 @@ references:
- uid: "ListT>makeMutableCopy(ListT,int)"
name: "ListT>makeMutableCopy(ListT,int)"
nameWithType: "ListT>makeMutableCopy(ListT,int)"
fullName: "ListT>makeMutableCopy(ListT,int)"
fullName: "ListT>makeMutableCopy(ListT,int)"
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ items:
- "com.google.api.gax.rpc.ClientSettings.Builder.setInternalHeaderProvider(com.google.api.gax.rpc.HeaderProvider)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setQuotaProjectId(java.lang.String)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setTransportChannelProvider(com.google.api.gax.rpc.TransportChannelProvider)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setUniverseDomain(java.lang.String)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setWatchdogCheckInterval(org.threeten.bp.Duration)"
- "com.google.api.gax.rpc.ClientSettings.Builder.setWatchdogProvider(com.google.api.gax.rpc.WatchdogProvider)"
- "com.google.api.gax.rpc.ClientSettings.Builder.toString()"
Expand Down Expand Up @@ -601,6 +602,11 @@ references:
name: "ClientSettings.Builder.setQuotaProjectId(String)"
nameWithType: "ClientSettings.Builder.setQuotaProjectId(String)"
fullName: "com.google.api.gax.rpc.ClientSettings.Builder.setQuotaProjectId(java.lang.String)"
- uid: "com.google.api.gax.rpc.ClientSettings.Builder.setUniverseDomain(java.lang.String)"
isExternal: true
name: "ClientSettings.Builder.setUniverseDomain(String)"
nameWithType: "ClientSettings.Builder.setUniverseDomain(String)"
fullName: "com.google.api.gax.rpc.ClientSettings.Builder.setUniverseDomain(java.lang.String)"
- uid: "com.google.api.gax.rpc.ClientSettings.Builder.getCredentialsProvider()"
isExternal: true
name: "ClientSettings.Builder.getCredentialsProvider()"
Expand Down Expand Up @@ -727,4 +733,4 @@ references:
- uid: "?,?>,java.lang.Void>)"
name: "?,?>,Void>)"
nameWithType: "?,?>,Void>)"
fullName: "?,?>,java.lang.Void>)"
fullName: "?,?>,java.lang.Void>)"
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ items:
- "com.google.api.gax.rpc.ClientSettings.getQuotaProjectId()"
- "com.google.api.gax.rpc.ClientSettings.getStubSettings()"
- "com.google.api.gax.rpc.ClientSettings.getTransportChannelProvider()"
- "com.google.api.gax.rpc.ClientSettings.getUniverseDomain()"
- "com.google.api.gax.rpc.ClientSettings.getWatchdogCheckInterval()"
- "com.google.api.gax.rpc.ClientSettings.getWatchdogProvider()"
- "com.google.api.gax.rpc.ClientSettings.toString()"
Expand Down Expand Up @@ -676,6 +677,11 @@ references:
name: "Object.wait(long,int)"
nameWithType: "Object.wait(long,int)"
fullName: "java.lang.Object.wait(long,int)"
- uid: "com.google.api.gax.rpc.ClientSettings.getUniverseDomain()"
isExternal: true
name: "ClientSettings.getUniverseDomain()"
nameWithType: "ClientSettings.getUniverseDomain()"
fullName: "com.google.api.gax.rpc.ClientSettings.getUniverseDomain()"
- uid: "com.google.api.gax.rpc.ClientSettings.getHeaderProvider()"
isExternal: true
name: "ClientSettings.getHeaderProvider()"
Expand Down Expand Up @@ -780,4 +786,4 @@ references:
- uid: "B>toBuilder()"
name: "B>toBuilder()"
nameWithType: "B>toBuilder()"
fullName: "B>toBuilder()"
fullName: "B>toBuilder()"
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ items:
- "com.google.api.gax.rpc.StubSettings.Builder.setSwitchToMtlsEndpointAllowed(boolean)"
- "com.google.api.gax.rpc.StubSettings.Builder.setTracerFactory(com.google.api.gax.tracing.ApiTracerFactory)"
- "com.google.api.gax.rpc.StubSettings.Builder.setTransportChannelProvider(com.google.api.gax.rpc.TransportChannelProvider)"
- "com.google.api.gax.rpc.StubSettings.Builder.setUniverseDomain(java.lang.String)"
- "com.google.api.gax.rpc.StubSettings.Builder.toString()"
- "java.lang.Object.clone()"
- "java.lang.Object.equals(java.lang.Object)"
Expand Down Expand Up @@ -541,6 +542,11 @@ references:
name: "StubSettings.Builder.setTracerFactory(ApiTracerFactory)"
nameWithType: "StubSettings.Builder.setTracerFactory(ApiTracerFactory)"
fullName: "com.google.api.gax.rpc.StubSettings.Builder.setTracerFactory(com.google.api.gax.tracing.ApiTracerFactory)"
- uid: "com.google.api.gax.rpc.StubSettings.Builder.setUniverseDomain(java.lang.String)"
isExternal: true
name: "StubSettings.Builder.setUniverseDomain(String)"
nameWithType: "StubSettings.Builder.setUniverseDomain(String)"
fullName: "com.google.api.gax.rpc.StubSettings.Builder.setUniverseDomain(java.lang.String)"
- uid: "com.google.api.gax.rpc.StubSettings.Builder.setSwitchToMtlsEndpointAllowed(boolean)"
isExternal: true
name: "StubSettings.Builder.setSwitchToMtlsEndpointAllowed(boolean)"
Expand Down Expand Up @@ -769,4 +775,4 @@ references:
- uid: "B>build()"
name: "B>build()"
nameWithType: "B>build()"
fullName: "B>build()"
fullName: "B>build()"
Loading

0 comments on commit 910ffa8

Please sign in to comment.