Skip to content

Build: Use Java 21 to publish snapshot to Maven #13369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Jun 23, 2025

Use the highest supported JDK version to publish snapshot to Maven, to fix https://github.com/apache/iceberg/actions/runs/15812361048/job/44565434608.

Both Java and Scala are configured with -release:11, it means even use a higher version of JDK to build, the output jars still compatible with Java 11.

  tasks.withType(JavaCompile.class).configureEach {
    options.encoding = "UTF-8"
    options.release = 11
  }
    tasks.withType(ScalaCompile.class) {
      scalaCompileOptions.keepAliveMode.set(KeepAliveMode.DAEMON)
      // `options.release` doesn't seem to work for ScalaCompile :(
      sourceCompatibility = "11"
      targetCompatibility = "11"
      scalaCompileOptions.additionalParameters.add("-release:11")
    }

@pan3793
Copy link
Member Author

pan3793 commented Jun 24, 2025

cc @huaxingao @pvary @RussellSpitzer

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.

1 participant