Skip to content

Commit 6087c88

Browse files
Strokkur424kezz
authored andcommitted
feat: add module-info.java to all modules
1 parent 595494c commit 6087c88

21 files changed

Lines changed: 220 additions & 4 deletions

File tree

api/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies {
1414
api(libs.examination.api)
1515
api(libs.examination.string)
1616
compileOnlyApi(libs.jetbrainsAnnotations)
17+
compileOnlyApi(libs.jspecify)
1718
testImplementation(libs.guava)
1819
annotationProcessor(projects.adventureAnnotationProcessors)
1920
testCompileOnly(libs.autoService.annotations)

api/src/main/java/module-info.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import org.jspecify.annotations.NullMarked;
2+
3+
/**
4+
* Adventure: a serverside user interface library for Minecraft: Java Edition.
5+
*
6+
* <p>See the <a href="https://docs.papermc.io/adventure/">documentation</a>
7+
* for usage and dependency information for this project and associated libraries.</p>
8+
*/
9+
@NullMarked
10+
module net.kyori.adventure.api {
11+
requires transitive net.kyori.adventure.key;
12+
requires transitive static org.jspecify;
13+
14+
exports net.kyori.adventure;
15+
exports net.kyori.adventure.audience;
16+
exports net.kyori.adventure.bossbar;
17+
exports net.kyori.adventure.builder;
18+
exports net.kyori.adventure.chat;
19+
exports net.kyori.adventure.dialog;
20+
exports net.kyori.adventure.identity;
21+
exports net.kyori.adventure.internal;
22+
exports net.kyori.adventure.inventory;
23+
exports net.kyori.adventure.nbt.api;
24+
exports net.kyori.adventure.permission;
25+
exports net.kyori.adventure.pointer;
26+
exports net.kyori.adventure.resource;
27+
exports net.kyori.adventure.sound;
28+
exports net.kyori.adventure.text;
29+
exports net.kyori.adventure.text.event;
30+
exports net.kyori.adventure.text.flattener;
31+
exports net.kyori.adventure.text.format;
32+
exports net.kyori.adventure.text.object;
33+
exports net.kyori.adventure.text.renderer;
34+
exports net.kyori.adventure.text.serializer;
35+
exports net.kyori.adventure.title;
36+
exports net.kyori.adventure.translation;
37+
exports net.kyori.adventure.util;
38+
}

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ option = { module = "net.kyori:option", version = "1.1.0" }
2424
guava = { module = "com.google.guava:guava", version.ref = "guava" }
2525
guava-testlib = { module = "com.google.guava:guava-testlib", version.ref = "guava" }
2626
jetbrainsAnnotations = "org.jetbrains:annotations:26.0.2-1"
27+
jspecify = "org.jspecify:jspecify:1.0.0"
2728

2829
# extra-kotlin
2930
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8" }

key/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dependencies {
1212
api(libs.examination.api)
1313
api(libs.examination.string)
1414
compileOnlyApi(libs.jetbrainsAnnotations)
15+
compileOnlyApi(libs.jspecify)
1516
testImplementation(libs.guava)
1617
}
1718

key/src/main/java/module-info.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import org.jspecify.annotations.NullMarked;
2+
3+
/**
4+
* A reference composed of a namespace and a path.
5+
*/
6+
@NullMarked
7+
module net.kyori.adventure.key {
8+
requires transitive net.kyori.examination.string;
9+
requires static org.jspecify;
10+
11+
exports net.kyori.adventure.key;
12+
}

nbt/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies {
66
api(libs.examination.api)
77
api(libs.examination.string)
88
compileOnlyApi(libs.jetbrainsAnnotations)
9+
compileOnlyApi(libs.jspecify)
910
}
1011

1112
applyJarMetadata("net.kyori.adventure.nbt")

nbt/src/main/java/module-info.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import org.jspecify.annotations.NullMarked;
2+
3+
/**
4+
* An implementation of the <a href="https://wiki.vg/NBT">NBT</a> format.
5+
*
6+
* <p>Adventure supports serializing to both binary and string representations
7+
* of the tags, both through {@link net.kyori.adventure.nbt.BinaryTagIO}</p>
8+
*/
9+
@NullMarked
10+
module net.kyori.adventure.nbt {
11+
requires transitive net.kyori.examination.string;
12+
requires static org.jspecify;
13+
14+
exports net.kyori.adventure.nbt;
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import org.jspecify.annotations.NullMarked;
2+
3+
/**
4+
* Serializers for Configurate 4.
5+
*/
6+
@NullMarked
7+
module net.kyori.adventure.serializer.configurate4 {
8+
requires transitive net.kyori.adventure.api;
9+
requires net.kyori.adventure.text.serializer.commons;
10+
requires io.leangen.geantyref;
11+
requires org.spongepowered.configurate;
12+
requires static org.checkerframework.checker.qual;
13+
14+
exports net.kyori.adventure.serializer.configurate4;
15+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import org.jspecify.annotations.NullMarked;
2+
3+
/**
4+
* A wrapper around <a href="https://slf4j.org">SLF4J</a> providing methods for formatted logging of Components.
5+
*
6+
* <p>This wrapper supports the API provided in 1.7/1.8, but does not yet implement the fluent API present in the 2.0 betas.</p>
7+
*/
8+
@NullMarked
9+
module net.kyori.adventure.text.logger.slf4j {
10+
requires transitive net.kyori.adventure.api;
11+
requires transitive org.slf4j;
12+
13+
exports net.kyori.adventure.text.logger.slf4j;
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import org.jspecify.annotations.NullMarked;
2+
3+
/**
4+
* MiniMessage, a friendly text format for representing chat components.
5+
*
6+
* @see <a href="https://docs.papermc.io/adventure/minimessage/format">Format Documentation</a>
7+
*/
8+
@NullMarked
9+
module net.kyori.adventure.text.minimessage {
10+
requires transitive net.kyori.adventure.api;
11+
12+
exports net.kyori.adventure.text.minimessage;
13+
exports net.kyori.adventure.text.minimessage.tag;
14+
exports net.kyori.adventure.text.minimessage.translation;
15+
exports net.kyori.adventure.text.minimessage.tree;
16+
}

0 commit comments

Comments
 (0)