-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92131ad
commit ac66afc
Showing
21 changed files
with
111 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,41 @@ Subject: [PATCH] Test changes | |
- Ignore package-private methods for nullability annotations | ||
- Add excludes for classes which don't pass | ||
- Disable stupid BukkitMirrorTest | ||
- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451 | ||
|
||
Co-authored-by: Riley Park <[email protected]> | ||
Co-authored-by: Jake Potrebic <[email protected]> | ||
Co-authored-by: Yannick Lamprecht <[email protected]> | ||
|
||
diff --git a/build.gradle.kts b/build.gradle.kts | ||
index 0b837b485bec96fa37ed65c18df97e55cecd0e9d..c8a8903d1b0c9822743549ecb8e4fdc7d0fd07c1 100644 | ||
index 0b837b485bec96fa37ed65c18df97e55cecd0e9d..904ed4978ab8175ff744beaae6eb2d736ca0cb6e 100644 | ||
--- a/build.gradle.kts | ||
+++ b/build.gradle.kts | ||
@@ -107,6 +107,12 @@ tasks.test { | ||
@@ -11,6 +11,7 @@ java { | ||
val annotationsVersion = "24.1.0" | ||
val bungeeCordChatVersion = "1.20-R0.2" | ||
|
||
+val mockitoAgent = configurations.create("mockitoAgent") // Paper - configure mockito agent that is needed in newer java versions | ||
dependencies { | ||
// api dependencies are listed transitively to API consumers | ||
api("com.google.guava:guava:32.1.2-jre") | ||
@@ -44,6 +45,7 @@ dependencies { | ||
testImplementation("org.hamcrest:hamcrest:2.2") | ||
testImplementation("org.mockito:mockito-core:5.14.1") | ||
testImplementation("org.ow2.asm:asm-tree:9.7.1") | ||
+ mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions | ||
} | ||
|
||
configure<PublishingExtension> { | ||
@@ -105,8 +107,19 @@ tasks.withType<Javadoc> { | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
+ // Paper start - configure mockito agent that is needed in newer java versions | ||
+ jvmArgumentProviders.add(CommandLineArgumentProvider { | ||
+ listOf("-javaagent:${mockitoAgent.asPath}") | ||
+ }) | ||
+ // Paper end - configure mockito agent that is needed in newer java versions | ||
} | ||
|
||
+// Paper start - compile tests with -parameters for better junit parameterized test names | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ Co-authored-by: Jake Potrebic <[email protected]> | |
Co-authored-by: Yannick Lamprecht <[email protected]> | ||
|
||
diff --git a/build.gradle.kts b/build.gradle.kts | ||
index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de066f23a4 100644 | ||
index ab6dc8a3e81c168c818d0d321a52b5b247596ef7..9d7cca022286f9f56811e3f9bd69b1093508aa63 100644 | ||
--- a/build.gradle.kts | ||
+++ b/build.gradle.kts | ||
@@ -11,12 +11,28 @@ java { | ||
@@ -11,13 +11,29 @@ java { | ||
|
||
val annotationsVersion = "24.1.0" | ||
val bungeeCordChatVersion = "1.20-R0.2" | ||
|
@@ -28,6 +28,7 @@ index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de | |
+ extendsFrom(apiAndDocs) | ||
+} | ||
|
||
val mockitoAgent = configurations.create("mockitoAgent") // Paper - configure mockito agent that is needed in newer java versions | ||
dependencies { | ||
// api dependencies are listed transitively to API consumers | ||
api("com.google.guava:guava:32.1.2-jre") | ||
|
@@ -41,7 +42,7 @@ index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de | |
api("org.yaml:snakeyaml:2.2") | ||
api("org.joml:joml:1.10.5") | ||
// Paper start | ||
@@ -24,6 +40,13 @@ dependencies { | ||
@@ -25,6 +41,13 @@ dependencies { | ||
isTransitive = false // includes junit | ||
} | ||
api("it.unimi.dsi:fastutil:8.5.6") | ||
|
@@ -55,7 +56,7 @@ index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de | |
// Paper end | ||
|
||
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6") | ||
@@ -100,15 +123,32 @@ tasks.withType<Javadoc> { | ||
@@ -102,15 +125,32 @@ tasks.withType<Javadoc> { | ||
"https://guava.dev/releases/32.1.2-jre/api/docs/", | ||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/", | ||
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,18 +6,18 @@ Subject: [PATCH] Brigadier based command API | |
Co-authored-by: Jake Potrebic <[email protected]> | ||
|
||
diff --git a/build.gradle.kts b/build.gradle.kts | ||
index 6c8464d9e862b1b4dbf7a77e25446aa870803dae..254fd96d3950b4494c7e43547b00b5175ee53c93 100644 | ||
index 725e8436b6d0ee66bbcf1949dfc69da6ca3ab72d..dc5ddb38dac668df63a9872adc81afc2f60e2e3c 100644 | ||
--- a/build.gradle.kts | ||
+++ b/build.gradle.kts | ||
@@ -27,6 +27,7 @@ configurations.api { | ||
} | ||
@@ -28,6 +28,7 @@ configurations.api { | ||
|
||
val mockitoAgent = configurations.create("mockitoAgent") // Paper - configure mockito agent that is needed in newer java versions | ||
dependencies { | ||
+ api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api | ||
// api dependencies are listed transitively to API consumers | ||
api("com.google.guava:guava:32.1.2-jre") | ||
api("com.google.code.gson:gson:2.10.1") | ||
@@ -93,9 +94,33 @@ sourceSets { | ||
@@ -95,9 +96,33 @@ sourceSets { | ||
} | ||
} | ||
// Paper end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,34 @@ From: Jake Potrebic <[email protected]> | |
Date: Mon, 13 Feb 2023 14:14:56 -0800 | ||
Subject: [PATCH] Test changes | ||
|
||
- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451 | ||
|
||
Co-authored-by: yannnicklamprecht <[email protected]> | ||
|
||
diff --git a/build.gradle.kts b/build.gradle.kts | ||
index d4a5229b4df544ff60cdaee80c8ae301faf2a235..41b000aaa71dca3fb392ae657be16e05bd37a178 100644 | ||
index d4a5229b4df544ff60cdaee80c8ae301faf2a235..c6556e9967347f046d5e91cc9266316aac18b8e7 100644 | ||
--- a/build.gradle.kts | ||
+++ b/build.gradle.kts | ||
@@ -23,6 +23,7 @@ dependencies { | ||
@@ -5,6 +5,8 @@ plugins { | ||
`maven-publish` | ||
} | ||
|
||
+val mockitoAgent = configurations.create("mockitoAgent") // Paper - configure mockito agent that is needed in newer java versions | ||
+ | ||
dependencies { | ||
implementation(project(":paper-api")) | ||
implementation("jline:jline:2.12.1") | ||
@@ -22,7 +24,9 @@ dependencies { | ||
testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0") | ||
testImplementation("org.hamcrest:hamcrest:2.2") | ||
testImplementation("org.mockito:mockito-core:5.14.1") | ||
+ mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions | ||
testImplementation("org.ow2.asm:asm-tree:9.7.1") | ||
+ testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest | ||
} | ||
|
||
paperweight { | ||
@@ -56,6 +57,12 @@ tasks.jar { | ||
@@ -56,6 +60,12 @@ tasks.jar { | ||
} | ||
} | ||
|
||
|
@@ -30,6 +43,18 @@ index d4a5229b4df544ff60cdaee80c8ae301faf2a235..41b000aaa71dca3fb392ae657be16e05 | |
publishing { | ||
publications.create<MavenPublication>("maven") { | ||
} | ||
@@ -79,6 +89,11 @@ tasks.test { | ||
forkEvery = 1 | ||
excludeTags("Slow") | ||
} | ||
+ // Paper start - configure mockito agent that is needed in newer java versions | ||
+ jvmArgumentProviders.add(CommandLineArgumentProvider { | ||
+ listOf("-javaagent:${mockitoAgent.asPath}") | ||
+ }) | ||
+ // Paper end - configure mockito agent that is needed in newer java versions | ||
} | ||
|
||
fun TaskContainer.registerRunTask( | ||
diff --git a/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java | ||
new file mode 100644 | ||
index 0000000000000000000000000000000000000000..d8857a05858585113bc7efde3416748effb53d01 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,10 @@ Other changes: | |
Co-Authored-By: Emilia Kond <[email protected]> | ||
|
||
diff --git a/build.gradle.kts b/build.gradle.kts | ||
index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e44ccf70f 100644 | ||
index 46fae04c2d6bac9b4ab1cf9c0f3e348e8d0ee2bc..e1abd3078735a7505d81b2a18227fa7d78b3a44b 100644 | ||
--- a/build.gradle.kts | ||
+++ b/build.gradle.kts | ||
@@ -5,9 +5,29 @@ plugins { | ||
@@ -5,11 +5,31 @@ plugins { | ||
`maven-publish` | ||
} | ||
|
||
|
@@ -38,6 +38,8 @@ index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e | |
+} | ||
+val alsoShade: Configuration by configurations.creating | ||
+ | ||
val mockitoAgent = configurations.create("mockitoAgent") // Paper - configure mockito agent that is needed in newer java versions | ||
|
||
dependencies { | ||
implementation(project(":paper-api")) | ||
- implementation("jline:jline:2.12.1") | ||
|
@@ -59,7 +61,7 @@ index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e | |
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion | ||
implementation("org.ow2.asm:asm-commons:9.7.1") | ||
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files | ||
@@ -79,6 +99,19 @@ tasks.check { | ||
@@ -82,6 +102,19 @@ tasks.check { | ||
dependsOn(scanJar) | ||
} | ||
// Paper end | ||
|
@@ -396,7 +398,7 @@ index a70e0ecedc7b70031334bc7fee981bd790ce26a4..56f046bac04205a813441907058c4ce2 | |
|
||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); | ||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
index 16a9142bdbbfbbbb69d1486bd119dc610094484b..2affb23b83e4368a94345b36410f23139f5d36c8 100644 | ||
index c3fc8b1abe843a19347509947f4b864c1b417800..e497da2dba83779c4ad1c45cea133bddadf61446 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
@@ -43,7 +43,7 @@ import java.util.logging.Level; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.