Skip to content

Project updates#51

Merged
stephenkirk-toast merged 1 commit intomainfrom
update-java-21-and-dependencies
Oct 20, 2025
Merged

Project updates#51
stephenkirk-toast merged 1 commit intomainfrom
update-java-21-and-dependencies

Conversation

@stephenkirk-toast
Copy link
Collaborator

@stephenkirk-toast stephenkirk-toast commented Oct 20, 2025

Upgrade to Java 21 and Gradle 8.10

Summary

Upgrades the project build toolchain from Java 17 to Java 21 and Gradle from 8.1.1 to 8.10. Also adds support for protokt extensions-lite library to resolve runtime classloading issues with
Google Protocol Buffer type converters.

Changes

Build System Upgrades

  • Java Version: Upgraded from Java 17 to Java 21
    • Updated JVM target to JVM_21 in Kotlin compiler options
    • Updated Java toolchain to use Java 21
  • Gradle Version: Upgraded from 8.1.1 to 8.10
    • Updated Gradle wrapper and wrapper scripts
    • Updated gradle-wrapper.properties with new distribution URL

Dependency Management

  • Added: proto-google-common-protos-extensions-lite as a compileOnly dependency
    • Provides Google Protobuf type converters (e.g., LocalDateGoogleConverter)
    • Follows the same runtime classloading pattern as other protokt common proto libraries
    • Prevents NoClassDefFoundError for converter classes at runtime

Code Changes

  • SeperatedJars.kt:
    • Added PROTOKT_COMMON_EXTENSIONS_LITE constant for the new extensions-lite jar
    • Updated protoKTJars list to include the new jar for runtime loading
    • Minor cleanup: Changed unused exception parameter to _ (suppresses warning)
  • Test Fixes:
    • Replaced deprecated URL(String) constructors with URI(String).toURL() in test files
    • Updated RunTimeJarLoaderTest to include the new extensions-lite jar in expected test data
    • Added proper imports for java.net.URI

Cleanup

  • Removed unused variables tempBuildDir and pulsarClientJar from build.gradle.kts

Testing

All tests pass successfully with the new configuration:

  • ✅ Unit tests updated and passing
  • ✅ Build compiles with -Werror (warnings as errors) enabled
  • ✅ Gradle wrapper verification successful

Breaking Changes

None - this is a backward-compatible upgrade that maintains existing functionality while adding support for additional protokt features.

Update gradle wrapper
Add missing protokt import
@stephenkirk-toast stephenkirk-toast marked this pull request as ready for review October 20, 2025 13:15
@stephenkirk-toast stephenkirk-toast changed the title Update to Java 21 Update gradle wrapper Add missing protokt import Project updates Oct 20, 2025
@stephenkirk-toast stephenkirk-toast merged commit 17f004c into main Oct 20, 2025
5 checks passed
@stephenkirk-toast stephenkirk-toast deleted the update-java-21-and-dependencies branch October 20, 2025 13:31
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