gradle9+ groovy.util.XmlParser not found #1478
Open
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
Gradle 9 已正式移除
groovy.util.XmlParser、groovy.util.Node等旧的 XML 解析类。当前代码仍依赖这些被移除的类,导致在 Gradle 9 环境下出现 ClassNotFoundException,无法完成编译与构建。
因此必须迁移到 Groovy 4+ 提供的现代命名空间
groovy.xml.*。After this PR
该 PR 完成以下内容:
groovy.util.XmlParser、groovy.util.Node、groovy.util.NodeList等引用迁移为groovy.xml.*。==COMMIT_MSG==
Migrate deprecated XML classes for Gradle 9 compatibility
Gradle 9 removes legacy Groovy XML classes under
groovy.util.*.This commit replaces:
groovy.util.XmlParser→groovy.xml.XmlParsergroovy.util.Node→groovy.xml.Nodegroovy.util.NodeList→groovy.xml.NodeListNo functional changes. Ensures the project builds successfully on Gradle 9 / Groovy 4.
==COMMIT_MSG==
Possible downsides?
groovy.util.XmlParser,可能需要一起升级。