Replace the XMLParser and XMLNodePrinter with those in the groovy.xml… #3413
+3
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR
In Gradle 9+ environments, the project fails with a
NoClassDefFoundErrorbecause it relies onXMLParserandXMLNodePrinterfrom the legacygroovy.utilpackage.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.XmlParserandgroovy.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.xmlpackage.This change replaces:
groovy.util.XmlParser→groovy.xml.XmlParsergroovy.util.XmlNodePrinter→groovy.xml.XmlNodePrinterThe legacy classes cause
NoClassDefFoundErrorunder Gradle 9+, because newer Groovy distributions no longer expose them.Switching to
groovy.xmlresolves the issue and improves forward compatibility.==COMMIT_MSG==
Possible downsides?