diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 60ad0fa..5afff6b 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -50,6 +50,9 @@ java { toolchain { languageVersion.set(JavaLanguageVersion.of(21)) } + + withSourcesJar() + withJavadocJar() } tasks.shadowJar { @@ -65,9 +68,9 @@ tasks.test { publishing { publications { create("mavenJava") { - artifact(tasks.shadowJar) { - builtBy(tasks.shadowJar) - } + from(components["shadow"]) + artifact(tasks.named("sourcesJar")) + artifact(tasks.named("javadocJar")) groupId = domain artifactId = id diff --git a/common/src/main/java/gg/moonrise/engine/message/Message.java b/common/src/main/java/gg/moonrise/engine/message/Message.java index 1b4bb7f..c193962 100644 --- a/common/src/main/java/gg/moonrise/engine/message/Message.java +++ b/common/src/main/java/gg/moonrise/engine/message/Message.java @@ -24,7 +24,7 @@ public static Message of(String content) { } /** - * Creates a Message object from multiple lines of strings, joining them with the delimiter. + * Creates a Message object from multiple lines of strings, joining them with the {@code } delimiter. * @param lines the lines of strings to join * @return a Message object containing the joined content */ @@ -33,7 +33,7 @@ public static Message of(String... lines) { } /** - * Creates a Message object from a list of strings, joining them with the delimiter. + * Creates a Message object from a list of strings, joining them with the {@code } delimiter. * @param lines the list of strings to join * @return a Message object containing the joined content */ diff --git a/common/src/main/java/gg/moonrise/engine/util/OptionalBool.java b/common/src/main/java/gg/moonrise/engine/util/OptionalBool.java index bec9ce6..5fdd90c 100644 --- a/common/src/main/java/gg/moonrise/engine/util/OptionalBool.java +++ b/common/src/main/java/gg/moonrise/engine/util/OptionalBool.java @@ -13,7 +13,7 @@ *

The class uses a singleton pattern for the two possible instances ({@code true} and {@code false}) * to ensure memory efficiency and reference equality for instances with the same boolean value.

* - *

Usage Examples:

+ *

Usage Examples:

*
{@code
  * OptionalBool condition = OptionalBool.of(someCondition);
  *
@@ -218,4 +218,3 @@ public String toString() {
         return "OptionalBool[" + value + "]";
     }
 }
-
diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts
index 6651dd4..a9a25a1 100644
--- a/paper/build.gradle.kts
+++ b/paper/build.gradle.kts
@@ -53,6 +53,9 @@ java {
     toolchain {
         languageVersion.set(JavaLanguageVersion.of(21))
     }
+
+    withSourcesJar()
+    withJavadocJar()
 }
 
 tasks.jar {
@@ -72,9 +75,9 @@ tasks.test {
 publishing {
     publications {
         create("mavenJava") {
-            artifact(tasks.shadowJar) {
-                builtBy(tasks.shadowJar)
-            }
+            from(components["shadow"])
+            artifact(tasks.named("sourcesJar"))
+            artifact(tasks.named("javadocJar"))
 
             groupId = domain
             artifactId = id