Skip to content

Build: Add Java 25 support by upgrading build toolchain and dependencies - #2

Closed
wangyum wants to merge 1 commit into
masterfrom
java25
Closed

wangyum wants to merge 1 commit into
masterfrom
java25

Conversation

@wangyum

@wangyum wangyum commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Background

This PR updates build.gradle and gradle/libs.versions.toml to support running Apache Iceberg on Java 25. The existing build was gated to JDK 17 and 21 only, and many dependencies were outdated or incompatible with modern JDK versions.

Closes apache#15930

Changes

build.gradle

  • Extended Java version guard to support Java 25 (previously only 17 and 21)
  • Upgraded Shadow plugin: com.github.johnrengelman:shadow:8.1.1 → com.gradleup.shadow:shadow-gradle-plugin:9.4.1
  • Upgraded Palantir Baseline: 4.42.0 → 6.90.0
  • Upgraded Spotless: 6.13.0 → 8.4.0
  • Upgraded JMH plugin: 0.7.1 → 0.7.3
  • Upgraded RevAPI: com.palantir.gradle.revapi:1.7.0 → org.revapi:gradle-revapi:1.8.0
  • Upgraded git-properties plugin: 2.4.1 → 2.5.7
  • Upgraded git-version plugin: 3.0.0 → 4.3.0
  • Added openapi-generator-gradle-plugin:7.21.0
  • Migrated all Hadoop dependencies from hadoop2 to hadoop3
  • Added arrow-memory-unsafe to iceberg-arrow as an alternative allocator to work around the Arrow/Netty UnsupportedOperationException on Java 25
  • Removed iceberg-pig module (not compatible with modern JDKs)
  • Added iceberg-azure, iceberg-bigquery, iceberg-open-api module configurations
  • Standardized useJUnitPlatform() across all test tasks
  • Set options.release = 17 for all JavaCompile tasks
  • Added test parallelism support via -DtestParallelism
  • Added reproducible archive task settings

gradle/libs.versions.toml

  • Added ASF license header
  • Arrow: 12.0.1 → 15.0.2
  • Avro: 1.11.1 → 1.12.1
  • Hadoop: hadoop2 = 2.7.3 → hadoop3 = 3.4.3
  • Netty: 4.1.68.Final → 4.2.12.Final
  • Nessie: 0.65.0 → 0.107.4
  • JUnit: 5.9.2 → 5.14.3
  • Jetty: 9.4.43.v20210629 → 12.1.7
  • Guava: 32.1.1-jre → 33.5.0-jre
  • Jackson: 2.14.2 → 2.21.2
  • Flink: 1.15/1.16/1.17 → 1.20/2.0/2.1
  • Spark: added spark34, spark35, spark40, spark41
  • Added: arrow-memory-unsafe, analyticsaccelerator, azuresdk-bom, datasketches, failsafe, kafka, lz4Java, testcontainers-junit-jupiter, testcontainers-minio, and more
  • Removed obsolete entries: pig, s3mock-junit5, spring-boot, spring-web, hadoop2, hive3, Flink 1.15–1.17, Tez 0.10

Test Plan

  • Build passes with JDK 25: ./gradlew build -x test
  • Core unit tests pass: ./gradlew :iceberg-core:test
  • Arrow tests pass: ./gradlew :iceberg-arrow:test
  • Verify Arrow allocator initializes without ExceptionInInitializerError under Java 25

Related

🤖 Generated with Claude Code

@github-actions github-actions Bot added the BUILD label Apr 10, 2026
@wangyum wangyum closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arrow memory allocation fails on Java 25: NettyAllocationManager static initializer throws UnsupportedOperationException

1 participant