Skip to content

Commit 5eede54

Browse files
rainbowdashlabsrenovate[bot]yannicklamprecht
authored
Fix javadocs (#222)
* Update dependency jacoco to v0.8.14 (#220) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update plugin io.freefair.aggregate-javadoc to v9 (#218) * Update plugin io.freefair.aggregate-javadoc to v9 * configure modules * Rename workflows * Fix docs * Split up verification * Rename job --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nora <46890129+RainbowDashLabs@users.noreply.github.com> * [skip ci] Autogenerated JaCoCo coverage badge * Properly name steps --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
1 parent 1f07a06 commit 5eede54

File tree

9 files changed

+85
-22
lines changed

9 files changed

+85
-22
lines changed

.github/badges/jacoco.svg

Lines changed: 1 addition & 1 deletion
Loading

.github/workflows/javadocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Javadocs
1+
name: Publish Javadocs
22

33
on:
44
push:

.github/workflows/publish_to_nexus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish
1+
name: Publish to Maven Central
22

33
on:
44
workflow_dispatch:

.github/workflows/verify.yml

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,68 @@
1-
name: Verify state
1+
name: Verify
22

33
on: [push, pull_request]
44

5+
env:
6+
JAVA_VERSION: 21
7+
JAVA_DISTRIBUTION: temurin
8+
59
jobs:
6-
build:
10+
compile:
11+
name: Compile
712
runs-on: ubuntu-latest
813

914
steps:
1015
- uses: actions/checkout@v5
11-
- name: Set up JDK 21
16+
- name: Set up JDK ${{ env.JAVA_VERSION }}
1217
uses: actions/setup-java@v5
1318
with:
14-
distribution: temurin
15-
java-version: 21
19+
distribution: ${{ env.JAVA_DISTRIBUTION }}
20+
java-version: ${{ env.JAVA_VERSION }}
21+
architecture: x64
22+
- name: Compile with Gradle
23+
run: ./gradlew jar
24+
25+
license:
26+
name: License
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v5
31+
- name: Set up JDK ${{ env.JAVA_VERSION }}
32+
uses: actions/setup-java@v5
33+
with:
34+
distribution: ${{ env.JAVA_DISTRIBUTION }}
35+
java-version: ${{ env.JAVA_VERSION }}
36+
architecture: x64
37+
- name: Check License
38+
run: ./gradlew spotlessCheck
39+
40+
test:
41+
name: Tests
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/checkout@v5
46+
- name: Set up JDK ${{ env.JAVA_VERSION }}
47+
uses: actions/setup-java@v5
48+
with:
49+
distribution: ${{ env.JAVA_DISTRIBUTION }}
50+
java-version: ${{ env.JAVA_VERSION }}
1651
architecture: x64
17-
- name: Build with Gradle
18-
run: ./gradlew --build-cache build -x test
1952
- name: Test with Gradle
2053
run: ./gradlew test
54+
55+
javadoc:
56+
name: Javadocs
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- uses: actions/checkout@v5
61+
- name: Set up JDK ${{ env.JAVA_VERSION }}
62+
uses: actions/setup-java@v5
63+
with:
64+
distribution: ${{ env.JAVA_DISTRIBUTION }}
65+
java-version: ${{ env.JAVA_VERSION }}
66+
architecture: x64
67+
- name: Build Javadocs with Gradle
68+
run: ./gradlew javadoc

build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.vanniktech.maven.publish.JavadocJar
44
import de.chojo.PublishData
55

66
plugins {
7-
id("io.freefair.aggregate-javadoc") version ("8.14.2")
7+
id("io.freefair.aggregate-javadoc") version ("9.0.0")
88
java
99
`maven-publish`
1010
`java-library`
@@ -27,6 +27,12 @@ val publicProjects = setOf("core", "bukkit", "paper", "jackson-bukkit")
2727
dependencies {
2828
api(project(":paper"))
2929
api(project(":bukkit"))
30+
31+
javadoc(project(":core"))
32+
javadoc(project(":paper"))
33+
javadoc(project(":bukkit"))
34+
35+
javadocClasspath(libs.paper.v120)
3036
}
3137

3238
allprojects {
@@ -81,7 +87,7 @@ allprojects {
8187
}
8288

8389
jacoco {
84-
toolVersion = "0.8.13"
90+
toolVersion = "0.8.14"
8591
}
8692

8793
tasks {
@@ -251,6 +257,7 @@ fun applyJavaDocOptions(options: MinimalJavadocOptions) {
251257
val javaDocOptions = options as StandardJavadocDocletOptions
252258
javaDocOptions.links(
253259
"https://javadoc.io/doc/org.jetbrains/annotations/latest/",
260+
"https://jd.papermc.io/paper/1.21.1",
254261
"https://docs.oracle.com/en/java/javase/${java.toolchain.languageVersion.get().asInt()}/docs/api/"
255262
)
256263
}

bukkit/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ description = "Module for serialization on Spigot based servers"
22

33
dependencies {
44
api(project(":core"))
5-
compileOnly("org.spigotmc", "spigot-api", "1.13.2-R0.1-SNAPSHOT")
5+
compileOnly(libs.spigot.v1132)
66

77
testImplementation(project(":core"))
8-
testImplementation("org.spigotmc", "spigot-api", "1.13.2-R0.1-SNAPSHOT")
8+
testImplementation(libs.spigot.v1132)
99
}

core/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
description = "Core module containing shared logic"
22
dependencies {
3-
compileOnly("org.spigotmc", "spigot-api", "1.20-R0.1-SNAPSHOT")
4-
testImplementation("org.spigotmc", "spigot-api", "1.20-R0.1-SNAPSHOT")
5-
testImplementation("com.github.seeseemelk", "MockBukkit-v1.19", "2.29.0")
3+
compileOnly(libs.spigot.v120)
4+
5+
testImplementation(libs.paper.v1194)
66
testImplementation(project(":bukkit"))
77
testImplementation(project(":testing"))
8-
testImplementation("org.spigotmc", "spigot-api", "1.19.2-R0.1-SNAPSHOT")
9-
testImplementation("com.github.seeseemelk", "MockBukkit-v1.19", "2.29.0")
8+
testImplementation(testlibs.mockbukkit.v119)
109
}

paper/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ description = "Module for serialization on Paper based servers"
22

33
dependencies {
44
api(project(":core"))
5-
compileOnly("io.papermc.paper", "paper-api", "1.20-R0.1-SNAPSHOT")
6-
testImplementation("io.papermc.paper", "paper-api", "1.19.4-R0.1-SNAPSHOT")
7-
testImplementation("com.github.seeseemelk", "MockBukkit-v1.19", "3.1.0")
5+
compileOnly(libs.paper.v120)
6+
testImplementation(libs.paper.v1194)
7+
testImplementation(testlibs.mockbukkit.v119)
88
testImplementation(project(":testing"))
99
}

settings.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ dependencyResolutionManagement {
3737
library("jackson-databind", "com.fasterxml.jackson.core", "jackson-databind").versionRef("jackson")
3838
bundle("jackson", listOf("jackson-core", "jackson-databind"))
3939

40+
library("paper-v120","io.papermc.paper", "paper-api").version("1.20-R0.1-SNAPSHOT")
41+
library("paper-v1194","io.papermc.paper", "paper-api").version("1.19.4-R0.1-SNAPSHOT")
42+
library("spigot-v120","org.spigotmc", "spigot-api").version("1.19.4-R0.1-SNAPSHOT")
43+
library("spigot-v1194","org.spigotmc", "spigot-api").version("1.19.4-R0.1-SNAPSHOT")
44+
library("spigot-v1132","org.spigotmc", "spigot-api").version("1.13.2-R0.1-SNAPSHOT")
45+
4046
}
4147

4248
create("testlibs") {
@@ -54,6 +60,9 @@ dependencyResolutionManagement {
5460
library("junit-jupiter-api", "org.junit.jupiter", "junit-jupiter-api").versionRef("junit")
5561
library("junit-params", "org.junit.jupiter", "junit-jupiter-params").versionRef("junit")
5662

63+
library("mockbukkit-v119","com.github.seeseemelk", "MockBukkit-v1.19").version("3.1.0")
64+
65+
5766
library("mockito", "org.junit.jupiter", "junit-jupiter-params").version("6.0.0")
5867
library("assertj-core", "org.assertj", "assertj-core").version("3.27.6")
5968

0 commit comments

Comments
 (0)