chore: modernise build and tests for Java 17 baseline#42
Merged
Conversation
Companion to the BanManager Java 17 modernisation sweep. Build - Stonecutter 0.7.11 -> 0.8.3 (settings.gradle.kts uses the renamed shared.version() API instead of vers()). - Foojay toolchain resolver 0.9.0 -> 1.0.0. - Add com.vanniktech.maven.publish to buildSrc so libs/sub-projects can publish consistently with BanManager. - Set Libs source/target compatibility and TargetJvmVersion attribute to 17 (matches the Java 17 baseline already in use by other modules). - Lombok 1.18.36 -> 1.18.38. - bStats Bukkit/Bungee/Velocity bumped to 3.2.1, Sponge to 3.2.1 (was a mix of 2.2.1 / 3.0.0 / 3.0.2). - Guava 17.0 -> 33.4.8-jre and dropped the unused bcpkix-jdk15on shade (only bcprov is referenced by the encoder). - Append -XX:+UseStringDeduplication to the Gradle JVM args. Tests - Migrate the three remaining tests (PlayerPinDataTest, CommonPlayerDeniedListenerTest, Argon2PasswordEncoderTest) from JUnit 4 + PowerMock + Mockito 4 to JUnit 5 + Mockito 5 (mockito-junit-jupiter 5.14.2). PowerMock dropped. - mariaDB4j 2.6.0 -> 3.3.1, awaitility 4.0.1 -> 4.3.0, jacoco 0.8.11 -> 0.8.12. - Refresh the forkEvery=1 inline comment to point at the BanManager common build for full rationale (JDBC drivers and native fixtures leak across runs). Verification - ./gradlew :BanManagerWebEnhancerCommon:test - 22 tests, 0 skipped, 0 failures, 0 errors. - Sequential ./gradlew build -x test produces every artifact across Bukkit, Bungee, Velocity, Sponge, and all 4 Fabric variants.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to BanManager PR #1070.
Modernises the build and remaining tests for the Java 17 baseline that's already in use, refreshes a few outdated dependencies, and unifies the bStats versions across platforms.
Changes
Build
0.7.11→0.8.3(settings.gradle.ktsuses the renamedshared.version()API instead ofvers()).0.9.0→1.0.0.com.vanniktech.maven.publishtobuildSrcso libs/sub-projects can publish consistently with BanManager.sourceCompatibility/targetCompatibilityand theTargetJvmVersionattribute to17(matches the Java 17 baseline already in use by other modules).1.18.36→1.18.38.3.2.1(was a mix of2.2.1/3.0.0/3.0.2).17.0→33.4.8-jreand dropped the unusedbcpkix-jdk15onshade (onlybcprovis referenced by the Argon2 encoder).-XX:+UseStringDeduplicationto the Gradle JVM args.Tests
PlayerPinDataTest,CommonPlayerDeniedListenerTest,Argon2PasswordEncoderTest) from JUnit 4 + PowerMock + Mockito 4 to JUnit 5 + Mockito 5 (mockito-junit-jupiter 5.14.2). PowerMock dropped.mariaDB4j 2.6.0→3.3.1,awaitility 4.0.1→4.3.0,jacoco 0.8.11→0.8.12.forkEvery=1inline comment to point at the BanManager common build for full rationale (JDBC drivers and native fixtures leak across runs).Test plan
./gradlew :BanManagerWebEnhancerCommon:test- 22 tests, 0 skipped, 0 failures, 0 errors../gradlew build -x testproduces every artifact across Bukkit, Bungee, Velocity, Sponge, and all 4 Fabric variants (1.20.1, 1.21.1, 1.21.4, 1.21.11).build.yml+e2e.yml) green.Notes