Skip to content

chore: modernise build and tests for Java 17 baseline#42

Merged
confuser merged 1 commit intomasterfrom
chore/java17-modernisation
Apr 18, 2026
Merged

chore: modernise build and tests for Java 17 baseline#42
confuser merged 1 commit intomasterfrom
chore/java17-modernisation

Conversation

@confuser
Copy link
Copy Markdown
Member

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

  • Stonecutter 0.7.110.8.3 (settings.gradle.kts uses the renamed shared.version() API instead of vers()).
  • Foojay toolchain resolver 0.9.01.0.0.
  • Added com.vanniktech.maven.publish to buildSrc so libs/sub-projects can publish consistently with BanManager.
  • Set Libs sourceCompatibility/targetCompatibility and the TargetJvmVersion attribute to 17 (matches the Java 17 baseline already in use by other modules).
  • Lombok 1.18.361.18.38.
  • bStats Bukkit/Bungee/Velocity/Sponge unified at 3.2.1 (was a mix of 2.2.1 / 3.0.0 / 3.0.2).
  • Guava 17.033.4.8-jre and dropped the unused bcpkix-jdk15on shade (only bcprov is referenced by the Argon2 encoder).
  • Append -XX:+UseStringDeduplication to the Gradle JVM args.

Tests

  • Migrated 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.03.3.1, awaitility 4.0.14.3.0, jacoco 0.8.110.8.12.
  • Refreshed the forkEvery=1 inline 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.
  • Sequential ./gradlew build -x test produces every artifact across Bukkit, Bungee, Velocity, Sponge, and all 4 Fabric variants (1.20.1, 1.21.1, 1.21.4, 1.21.11).
  • CI (build.yml + e2e.yml) green.
  • Smoke test on a real server alongside the BanManager modernisation PR (validates the SLF4J/HikariCP/MariaDB/MySQL upgrades over there don't regress WebEnhancer's pin/web flows).

Notes

  • The companion BanManager PR carries the bigger lift (HikariCP/ORMLite/JDBC driver upgrades, SLF4J 2.x, full JUnit 5 sweep across 67 test classes, DTOs to records). This PR is intentionally narrow.

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.
@confuser confuser merged commit 5a3cab8 into master Apr 18, 2026
12 checks passed
@confuser confuser deleted the chore/java17-modernisation branch April 18, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant