From 170ae5f3da6f178ed3feca22cc243040de01b094 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Fri, 5 Apr 2024 03:38:45 +0100 Subject: [PATCH] Fixes Javadocs build & adds workflow to ensure no more breakages --- .github/workflows/javadocs.yml | 37 +++++++++++++++++++ .gitignore | 1 + pom.xml | 2 +- .../core/services/ThreadService.java | 4 +- 4 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/javadocs.yml diff --git a/.github/workflows/javadocs.yml b/.github/workflows/javadocs.yml new file mode 100644 index 0000000000..6e3d668f6e --- /dev/null +++ b/.github/workflows/javadocs.yml @@ -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/setup-java@v4.0.0 + 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 diff --git a/.gitignore b/.gitignore index e6f9d7a43c..a6d46cc670 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /.idea/ /.vscode/ /data-storage/ +/javadocs/ dependency-reduced-pom.xml diff --git a/pom.xml b/pom.xml index 6c55af4f34..1cc216d1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -239,7 +239,7 @@ ${project.basedir} - docs + javadocs Slimefun4 - Javadocs Slimefun4 - Javadocs diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java index 772b65d3fe..a5aa0c58e0 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java @@ -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 - - " which is nice to show the plugin but + * By default, Bukkit will use "Craft Scheduler Thread - {@literal } - {@literal }" 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 @@ -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 - - " which is nice to show the plugin but + * By default, Bukkit will use "Craft Scheduler Thread - {@literal } - {@literal }" 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