Skip to content

Conversation

rpalcolea
Copy link

Before this PR

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.

After this PR

The plugin uses groovy.xml artifacts and is compatible with Gradle 9.x

@palantirtech
Copy link
Member

Thanks for your interest in palantir/palantir-java-format, @rpalcolea! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@changelog-app
Copy link

changelog-app bot commented Jul 25, 2025

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Migrate usages of deprecated classes in groovy.util package to groovyxml ones. fixes #1379

Check the box to generate changelog(s)

  • Generate changelog entry

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