mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-25 09:59:15 +00:00
1. Wet the drys 2. Dry the wets 3. Wet the drys 4. Dry the wets 5. Wet the drys 6. Now dust the wets
207 lines
8.3 KiB
Diff
207 lines
8.3 KiB
Diff
--- a/paper-api/build.gradle.kts
|
|
+++ b/paper-api/build.gradle.kts
|
|
@@ -9,11 +_,13 @@
|
|
withJavadocJar()
|
|
}
|
|
|
|
-val annotationsVersion = "26.0.1"
|
|
+val annotationsVersion = "26.0.2" // Leaf - Bump Dependencies
|
|
val bungeeCordChatVersion = "1.20-R0.2"
|
|
val adventureVersion = "4.18.0"
|
|
-val slf4jVersion = "2.0.9"
|
|
-val log4jVersion = "2.17.1"
|
|
+// Leaf start - Bump Dependencies
|
|
+val slf4jVersion = "2.0.17"
|
|
+val log4jVersion = "2.24.3"
|
|
+// Leaf end - Bump Dependencies
|
|
|
|
val apiAndDocs: Configuration by configurations.creating {
|
|
attributes {
|
|
@@ -41,9 +_,11 @@
|
|
dependencies {
|
|
|
|
// api dependencies are listed transitively to API consumers
|
|
- api("com.google.guava:guava:33.3.1-jre")
|
|
- api("com.google.code.gson:gson:2.11.0")
|
|
- api("org.yaml:snakeyaml:2.2")
|
|
+ // Leaf start - Bump Dependencies
|
|
+ api("com.google.guava:guava:33.4.0-jre")
|
|
+ api("com.google.code.gson:gson:2.12.1")
|
|
+ api("org.yaml:snakeyaml:2.3") // 2.4 removed `org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder`
|
|
+ // Leaf end - Bump Dependencies
|
|
api("org.joml:joml:1.10.8") {
|
|
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
|
|
}
|
|
@@ -54,6 +_,7 @@
|
|
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
|
|
api("org.slf4j:slf4j-api:$slf4jVersion")
|
|
api("com.mojang:brigadier:1.3.10")
|
|
+ api("io.sentry:sentry:8.4.0") // Pufferfish
|
|
|
|
// Deprecate bungeecord-chat in favor of adventure
|
|
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.19") {
|
|
@@ -68,32 +_,42 @@
|
|
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
|
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
|
|
|
- api("org.apache.maven:maven-resolver-provider:3.9.6") // make API dependency for Paper Plugins
|
|
- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
|
- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
|
+ // Leaf start - Bump Dependencies
|
|
+ api("org.apache.maven:maven-resolver-provider:3.9.9") // make API dependency for Paper Plugins
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.22") // Dreeam TODO - Update to 2.0.1
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.22") // Dreeam TODO - Update to 2.0.1
|
|
+ // Leaf start - Bump Dependencies
|
|
|
|
// Annotations - Slowly migrate to jspecify
|
|
val annotations = "org.jetbrains:annotations:$annotationsVersion"
|
|
compileOnly(annotations)
|
|
testCompileOnly(annotations)
|
|
|
|
- val checkerQual = "org.checkerframework:checker-qual:3.33.0"
|
|
+ val checkerQual = "org.checkerframework:checker-qual:3.49.1" // Leaf - Bump Dependencies
|
|
compileOnlyApi(checkerQual)
|
|
testCompileOnly(checkerQual)
|
|
|
|
api("org.jspecify:jspecify:1.0.0")
|
|
|
|
// Test dependencies
|
|
- testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
|
- testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
|
- testImplementation("org.hamcrest:hamcrest:2.2")
|
|
- testImplementation("org.mockito:mockito-core:5.14.1")
|
|
+ // Leaf start - Bump Dependencies
|
|
+ testImplementation("org.apache.commons:commons-lang3:3.17.0")
|
|
+ testImplementation("org.junit.jupiter:junit-jupiter:5.12.1")
|
|
+ testImplementation("org.hamcrest:hamcrest:3.0")
|
|
+ testImplementation("org.mockito:mockito-core:5.16.1")
|
|
+ // Leaf end - Bump Dependencies
|
|
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
|
- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // configure mockito agent that is needed in newer java versions
|
|
+ mockitoAgent("org.mockito:mockito-core:5.16.1") { isTransitive = false } // configure mockito agent that is needed in newer java versions // Leaf - Bump Dependencies
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
+
|
|
+ // Leaf start - Bump Dependencies
|
|
+ // commons-lang3 is removed in maven-resolver-provider since 3.9.8
|
|
+ // Add this because bukkit api still need it.
|
|
+ compileOnly("org.apache.commons:commons-lang3:3.17.0")
|
|
+ // Leaf end - Bump Dependencies
|
|
}
|
|
|
|
-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
|
|
+val generatedDir: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath() // Leaf - project setup
|
|
idea {
|
|
module {
|
|
generatedSourceDirs.add(generatedDir.toFile())
|
|
@@ -103,6 +_,20 @@
|
|
main {
|
|
java {
|
|
srcDir(generatedDir)
|
|
+ // Leaf start - project setup
|
|
+ srcDir(file("../paper-api/src/main/java"))
|
|
+ }
|
|
+ resources {
|
|
+ srcDir(file("../paper-api/src/main/resources"))
|
|
+ }
|
|
+ }
|
|
+ test {
|
|
+ java {
|
|
+ srcDir(file("../paper-api/src/test/java"))
|
|
+ }
|
|
+ resources {
|
|
+ srcDir(file("../paper-api/src/test/resources"))
|
|
+ // Leaf end - project setup
|
|
}
|
|
}
|
|
}
|
|
@@ -140,6 +_,15 @@
|
|
}
|
|
}
|
|
|
|
+// Gale start - hide irrelevant compilation warnings
|
|
+tasks.withType<JavaCompile> {
|
|
+ val compilerArgs = options.compilerArgs
|
|
+ compilerArgs.add("-Xlint:-module")
|
|
+ compilerArgs.add("-Xlint:-removal")
|
|
+ compilerArgs.add("-Xlint:-dep-ann")
|
|
+ compilerArgs.add("--add-modules=jdk.incubator.vector") // Gale - Pufferfish - SIMD support
|
|
+}
|
|
+// Gale end - hide irrelevant compilation warnings
|
|
val generateApiVersioningFile by tasks.registering {
|
|
inputs.property("version", project.version)
|
|
val pomProps = layout.buildDirectory.file("pom.properties")
|
|
@@ -159,6 +_,12 @@
|
|
"Automatic-Module-Name" to "org.bukkit"
|
|
)
|
|
}
|
|
+
|
|
+ // Gale start - package license into jar
|
|
+ from("${project.projectDir}/LICENSE.txt") {
|
|
+ into("")
|
|
+ }
|
|
+ // Gale end - package license into jar
|
|
}
|
|
|
|
abstract class Services {
|
|
@@ -169,12 +_,12 @@
|
|
|
|
tasks.withType<Javadoc> {
|
|
val options = options as StandardJavadocDocletOptions
|
|
- options.overview = "src/main/javadoc/overview.html"
|
|
+ options.overview = "../paper-api/src/main/javadoc/overview.html" // Leaf - project setup
|
|
options.use()
|
|
options.isDocFilesSubDirs = true
|
|
options.links(
|
|
- "https://guava.dev/releases/33.3.1-jre/api/docs/",
|
|
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
|
+ "https://guava.dev/releases/33.4.0-jre/api/docs/", // Leaf - Bump Dependencies
|
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.3/", // Leaf - Bump Dependencies
|
|
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
|
|
"https://javadoc.io/doc/org.joml/joml/1.10.8/",
|
|
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
|
|
@@ -187,8 +_,8 @@
|
|
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
|
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
|
"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
|
|
- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
|
|
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
|
|
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/2.20.0/", // Leaf - Bump Dependencies
|
|
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.22", // Leaf - Bump Dependencies
|
|
)
|
|
options.tags("apiNote:a:API Note:")
|
|
|
|
@@ -202,16 +_,19 @@
|
|
}
|
|
|
|
// workaround for https://github.com/gradle/gradle/issues/4046
|
|
- inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
|
|
+ inputs.dir("../paper-api/src/main/javadoc").withPropertyName("javadoc-sourceset") // Leaf - project setup
|
|
val fsOps = services.fileSystemOperations
|
|
doLast {
|
|
fsOps.copy {
|
|
- from("src/main/javadoc") {
|
|
+ from("../paper-api/src/main/javadoc") { // Leaf - project setup
|
|
include("**/doc-files/**")
|
|
}
|
|
into("build/docs/javadoc")
|
|
}
|
|
}
|
|
+
|
|
+ options.addStringOption("Xdoclint:none", "-quiet") // Gale - hide irrelevant compilation warnings
|
|
+ options.addStringOption("-add-modules", "jdk.incubator.vector") // Gale - Pufferfish - SIMD support
|
|
}
|
|
|
|
tasks.test {
|
|
@@ -233,6 +_,11 @@
|
|
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
|
classpath.from(configurations.compileClasspath)
|
|
}
|
|
+// Leaf start - Bump Dependencies
|
|
+repositories {
|
|
+ mavenCentral()
|
|
+}
|
|
+// Leaf end - Bump Dependencies
|
|
tasks.check {
|
|
dependsOn(scanJarForBadCalls)
|
|
}
|