Skip to content

Commit 03e5b9a

Browse files
authored
Fixes Javadocs build & adds workflow to ensure no more breakages (#4168)
1 parent f4581e4 commit 03e5b9a

4 files changed

Lines changed: 41 additions & 3 deletions

File tree

.github/workflows/javadocs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Javadocs
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/**'
7+
- 'pom.xml'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
name: Maven build
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@v4.0.0
23+
with:
24+
distribution: 'adopt'
25+
java-version: '17'
26+
java-package: jdk
27+
architecture: x64
28+
29+
- name: Cache Maven packages
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.m2
33+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: ${{ runner.os }}-m2
35+
36+
- name: Build Javadocs
37+
run: mvn javadoc:javadoc

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/.idea/
77
/.vscode/
88
/data-storage/
9+
/javadocs/
910

1011
dependency-reduced-pom.xml
1112

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239

240240
<configuration>
241241
<reportOutputDirectory>${project.basedir}</reportOutputDirectory>
242-
<destDir>docs</destDir>
242+
<destDir>javadocs</destDir>
243243

244244
<doctitle>Slimefun4 - Javadocs</doctitle>
245245
<windowtitle>Slimefun4 - Javadocs</windowtitle>

src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public Thread newThread(Runnable r) {
3939
* This is a much better alternative to using
4040
* {@link BukkitScheduler#runTaskAsynchronously(org.bukkit.plugin.Plugin, Runnable)}
4141
* as this will show not only the plugin but a useful name.
42-
* By default, Bukkit will use "Craft Scheduler Thread - <x> - <plugin>" which is nice to show the plugin but
42+
* By default, Bukkit will use "Craft Scheduler Thread - {@literal <x>} - {@literal <plugin>}" which is nice to show the plugin but
4343
* it's impossible to track exactly what thread that is.
4444
*
4545
* @param plugin The {@link JavaPlugin} that is creating this thread
@@ -60,7 +60,7 @@ public void newThread(JavaPlugin plugin, String name, Runnable runnable) {
6060
* This is a much better alternative to using
6161
* {@link BukkitScheduler#runTaskTimerAsynchronously(org.bukkit.plugin.Plugin, Runnable, long, long)}
6262
* as this will show not only the plugin but a useful name.
63-
* By default, Bukkit will use "Craft Scheduler Thread - <x> - <plugin>" which is nice to show the plugin but
63+
* By default, Bukkit will use "Craft Scheduler Thread - {@literal <x>} - {@literal <plugin>}" which is nice to show the plugin but
6464
* it's impossible to track exactly what thread that is.
6565
*
6666
* @param plugin The {@link JavaPlugin} that is creating this thread

0 commit comments

Comments
 (0)