Skip to content

Commit

Permalink
Fixes Javadocs build & adds workflow to ensure no more breakages
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev committed Apr 5, 2024
1 parent f4581e4 commit 170ae5f
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Javadocs

on:
push:
paths:
- 'src/**'
- 'pom.xml'

permissions:
contents: read

jobs:
build:
name: Maven build
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '17'
java-package: jdk
architecture: x64

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build Javadocs
run: mvn javadoc:javadoc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/.idea/
/.vscode/
/data-storage/
/javadocs/

dependency-reduced-pom.xml

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@

<configuration>
<reportOutputDirectory>${project.basedir}</reportOutputDirectory>
<destDir>docs</destDir>
<destDir>javadocs</destDir>

<doctitle>Slimefun4 - Javadocs</doctitle>
<windowtitle>Slimefun4 - Javadocs</windowtitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Thread newThread(Runnable r) {
* This is a much better alternative to using
* {@link BukkitScheduler#runTaskAsynchronously(org.bukkit.plugin.Plugin, Runnable)}
* as this will show not only the plugin but a useful name.
* By default, Bukkit will use "Craft Scheduler Thread - <x> - <plugin>" which is nice to show the plugin but
* By default, Bukkit will use "Craft Scheduler Thread - {@literal <x>} - {@literal <plugin>}" which is nice to show the plugin but
* it's impossible to track exactly what thread that is.
*
* @param plugin The {@link JavaPlugin} that is creating this thread
Expand All @@ -60,7 +60,7 @@ public void newThread(JavaPlugin plugin, String name, Runnable runnable) {
* This is a much better alternative to using
* {@link BukkitScheduler#runTaskTimerAsynchronously(org.bukkit.plugin.Plugin, Runnable, long, long)}
* as this will show not only the plugin but a useful name.
* By default, Bukkit will use "Craft Scheduler Thread - <x> - <plugin>" which is nice to show the plugin but
* By default, Bukkit will use "Craft Scheduler Thread - {@literal <x>} - {@literal <plugin>}" which is nice to show the plugin but
* it's impossible to track exactly what thread that is.
*
* @param plugin The {@link JavaPlugin} that is creating this thread
Expand Down

0 comments on commit 170ae5f

Please sign in to comment.