Skip to content

Commit

Permalink
Generate Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jul 28, 2020
1 parent a0bc7a8 commit 91e3df8
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 15 deletions.
60 changes: 54 additions & 6 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ name: documentation
on: [push]

jobs:
javadoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: submodules-init
uses: snickerbockers/submodules-init@v4
- name: Build with Maven
run: |
mvn -B javadoc:aggregate
- name: Archive artifacts (Geyser Javadoc)
uses: actions/upload-artifact@v2
if: success()
with:
name: javadoc
path: target/site/

documentation:
runs-on: ubuntu-latest
steps:
Expand All @@ -30,15 +56,37 @@ jobs:
- run: mkdocs build

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: documentation
path: build/docs

deploy:
if: github.ref == 'refs/heads/feature/plugins-registered'
needs: [javadoc, documentation]

runs-on: ubuntu-latest
steps:
- name: Download Javadoc Artifact
uses: actions/download-artifact@v2
with:
name: javadoc
path: target/site

- name: Download Documentation Artifact
uses: actions/download-artifact@v2
with:
name: documentation
path: build/docs

- run: |
mv target/site/apidocs build/docs/apidocs
- name: Deploy to Github Pages
if: github.ref == 'refs/heads/feature/plugins'
if: github.ref == 'refs/heads/feature/plugins-registered'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./build/docs

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: documentation
path: build/docs
26 changes: 26 additions & 0 deletions connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,32 @@

<build>
<plugins>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.12.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
<configuration>
<addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<defaultVersion>${project.version}</defaultVersion>
<sourcepath>target/generated-sources/delombok</sourcepath>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class GeyserConnector {
public static BedrockPacketCodec BEDROCK_PACKET_CODEC;

public static final String NAME = "Geyser";
public static final String VERSION = "DEV"; // A fallback for running in IDEs
public static final String VERSION = "1.1.0-SNAPSHOT (git-feature/plugins-registered-f640df9)"; // A fallback for running in IDEs

private final List<GeyserSession> players = new ArrayList<>();

Expand Down
15 changes: 8 additions & 7 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: GeyserMC
site_author: Geyser Devs
site_url: https://github.com/GeyserMC/Geyser
site_url: https://bundabrg.github.io/Geyser
site_dir: build/docs
repo_name: GeyserMC/Geyser
repo_url: https://github.com/GeyserMC/Geyser
Expand Down Expand Up @@ -62,11 +62,11 @@ plugins:
- 'theme/*'
- git-revision-date-localized:
type: timeago
- mkpdfs:
author: GeyserMC Developers
toc_title: Table of contents
output_path: pdf/documentation.pdf
design: docs/css/pdf.css
# - mkpdfs:
# author: GeyserMC Developers
# toc_title: Table of contents
# output_path: pdf/documentation.pdf
# design: docs/css/pdf.css

# Discord not yet supported but it will be soon
#extra:
Expand All @@ -78,4 +78,5 @@ nav:
- Introduction: index.md
- Events: events.md
- Plugins: plugins.md
- Contributing: contributing.md
- Contributing: contributing.md
- API: 'https://bundabrg.github.io/Geyser/apidocs/'
23 changes: 22 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,29 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.4</version>
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>aggregate</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>site</phase>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 91e3df8

Please sign in to comment.