palantir / palantir/palantir-java-format

Gradle plugin is not compatible with upcoming Gradle 9.x

Open
#1,379 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
907
Forks
101
Avg merge
1d 3h
Merged PRs (30d)
19

Description

Hi folks!

I noticed that trying to use the gradle plugin fails in Gradle 9.0.0-rc-3 fails with:

Caused by: java.lang.NoClassDefFoundError: groovy/util/XmlNodePrinter
        at com.palantir.javaformat.gradle.XmlUtils.updateIdeaXmlFile(XmlUtils.java:51)
        at com.palantir.javaformat.gradle.UpdatePalantirJavaFormatIdeaXmlFile.updateXml(UpdatePalantirJavaFormatIdeaXmlFile.java:60)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)

This makes sense as groovy/util/XmlNodePrinter and other classes were deprecated back in Groovy 3.x and removed in 4.x in favor of groovy.xml package.

I think moving to newer packages is sufficient enough

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with com.palantir.javaformat.gradle.XmlUtils.java at the reported updateIdeaXmlFile failure, then inspect UpdatePalantirJavaFormatIdeaXmlFile.java and the Gradle plugin setup. Reproduce the NoClassDefFoundError with Gradle 9.0.0-rc-3 and verify that the plugin runs successfully with the updated XML handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.