Skip to content

Conversation

@ZiySir
Copy link

@ZiySir ZiySir commented Dec 6, 2025

Before this PR

In Gradle 9+ environments, the project fails with a NoClassDefFoundError because it relies on XMLParser and XMLNodePrinter from the legacy groovy.util package.
These classes are no longer available or accessible under newer Gradle/Groovy distributions, causing builds to break.

After this PR

The XML parsing and printing logic is updated to use groovy.xml.XmlParser and groovy.xml.XmlNodePrinter.
This resolves the NoClassDefFoundError, aligns the codebase with modern Groovy XML APIs, and restores compatibility with Gradle 9+.

==COMMIT_MSG==
Replace legacy Groovy XML utilities with those from the groovy.xml package.

This change replaces:

  • groovy.util.XmlParsergroovy.xml.XmlParser
  • groovy.util.XmlNodePrintergroovy.xml.XmlNodePrinter

The legacy classes cause NoClassDefFoundError under Gradle 9+, because newer Groovy distributions no longer expose them.
Switching to groovy.xml resolves the issue and improves forward compatibility.
==COMMIT_MSG==

Possible downsides?

  • Minor XML formatting differences may occur because the newer printer behaves slightly differently.
  • Users relying on the exact output structure or whitespace may observe small changes.

@changelog-app
Copy link

changelog-app bot commented Dec 6, 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

Replace legacy Groovy XML utilities with those from the groovy.xml package.

This change replaces:

  • groovy.util.XmlParsergroovy.xml.XmlParser
  • groovy.util.XmlNodePrintergroovy.xml.XmlNodePrinter

The legacy classes cause NoClassDefFoundError under Gradle 9+, because newer Groovy distributions no longer expose them.
Switching to groovy.xml resolves the issue and improves forward compatibility.

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.

1 participant