Skip to content

Conversation

@JinwooHwang
Copy link
Contributor

Overview

This PR modernizes the geode-examples project by upgrading to current LTS versions of Java and Gradle, and updating to Apache Geode 2.0.0.

Changes

Build Tool Upgrades

  • Gradle: 5.5 to 7.3.3
    • Updated main wrapper in gradle/wrapper/gradle-wrapper.properties
    • Updated webapp wrapper in sessionState/webapp/gradle/wrapper/gradle-wrapper.properties
  • Java: 8 to 17
    • Updated source and target compatibility across all subprojects
    • Updated GitHub Actions workflow to use Java 17

Apache Geode Version

  • Geode: 2.1.+ (snapshots) to 2.0.0
    • Updated geodeVersion in gradle.properties

Gradle Configuration Modernization

Replaced all deprecated Gradle configurations:

  • compile to implementation
  • testCompile to testImplementation
  • providedCompile to compileOnly
  • archiveBaseName to archiveFileName
  • baseName to distributionBaseName
  • configurations['runtime'] to configurations.runtimeClasspath

Plugin Updates

  • Spotless: 3.0.0 to 6.11.0
    • Updated plugin ID: com.diffplug.gradle.spotless to com.diffplug.spotless
    • Updated API: eclipseFormatFile() to eclipse().configFile()
  • Rat: 0.6.0 to 0.8.0
  • Download: 3.1.2 to 5.0.1

Lucene Dependency Updates

  • Lucene: 6.4.1 to 9.12.3
  • Added explicit spatial4j:0.8 dependency
  • Fixed API compatibility issues in luceneSpatial:
    • RAMDirectory to ByteBuffersDirectory
    • totalHits to totalHits.value

Modified Files

  • .github/workflows/gradle.yml
  • build.gradle
  • gradle.properties
  • gradle/release.gradle
  • gradle/spotless.gradle
  • gradle/wrapper/gradle-wrapper.properties
  • lucene/build.gradle
  • luceneSpatial/build.gradle
  • luceneSpatial/src/test/java/org/apache/geode/examples/luceneSpatial/SpatialHelperTest.java
  • micrometerMetrics/build.gradle
  • sessionState/webapp/build.gradle
  • sessionState/webapp/gradle/wrapper/gradle-wrapper.properties

Testing

All builds and tests pass successfully:

  • ./gradlew build - passes
  • ./gradlew test - all tests pass
  • ./gradlew spotlessApply - code formatting works
  • Verified with Geode 2.0.0

Rationale

  • Java 17: Current LTS version with long-term support
  • Gradle 7.3.3: Modern dependency management and better performance

Breaking Changes

None for end users. All examples maintain the same functionality.

- Update Gradle wrapper from 5.5 to 7.3.3
- Upgrade Java compatibility from 8 to 17
- Update Apache Geode version to 2.0.0
- Replace all deprecated Gradle configurations (compile->implementation, etc.)
- Update Lucene dependencies to 9.12.3 and fix API compatibility
- Update Spotless plugin to 6.11.0
- Fix test failures with Lucene 9 API changes (RAMDirectory->ByteBuffersDirectory)
- Update CI workflow to Java 17
Configure GitHub Actions to use orgapachegeode-1146 staging repository via -PgeodeRepositoryUrl parameter. Geode 2.0.0 is currently in release candidate phase and not yet publicly available in Maven Central.
Use .get() for lazy property evaluation to ensure jar files are named correctly (e.g., async.jar instead of malformed filenames).
@JinwooHwang
Copy link
Contributor Author

@sboorlagadda, all checks have passed. Thank you for your support.

@JinwooHwang
Copy link
Contributor Author

We are ready to merge, @sboorlagadda .

uses: gradle/gradle-build-action@v2
with:
arguments: runAll --console=plain --no-daemon
arguments: runAll -PgeodeRepositoryUrl=https://repository.apache.org/content/repositories/orgapachegeode-1146 --console=plain --no-daemon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to keep them on this branch first and then again update it when 2.0.0? is released

Copy link
Contributor Author

@JinwooHwang JinwooHwang Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @sboorlagadda . Thank you for your review.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I see you already updated to 2.1.0 last week with this commit #2a1186e

So you want this update to 2.0.0 RC so that people can verify examples work (part of the release check) and then go back to 2.1.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarification. I am approving it now. But I want to go back and see in the past how this is done. Because it is always the case that the develop will be rolled up before the release etc. LGTM for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for your approval @sboorlagadda

@JinwooHwang JinwooHwang merged commit 5f33d17 into apache:develop Dec 9, 2025
1 check passed
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.

2 participants