You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like org.gradle.util.VersionNumber was deprecated and moved to an internal class in 7.1. Is there any replacement which plugin authors can use that will survive the switch to 8.0?
This class always came in super handy when working with various version numbers, so I'd be sad to see it go without any replacement.
The text was updated successfully, but these errors were encountered:
There are no plans to provide a replacement API right now.
Your best option is to either 1) copy the class into the plugin or 2) find an external library that does something similar.
The problem with VersionNumber is that there is no single standard way to format a version. This class takes an approach that's like many version formats, but it was always limited to what was useful for our specific needs and wasn't general purpose.
It's very tempting to pass a String into this and get something out that's a "version", but there are no guarantees that it makes any sense unless you know how the version format should be interpreted. The thinking is that it's best to leave version parsing/interpretation up to the plugin that has the context about the version.
Is there a recommended workaround for this? Was planning to use VersionNumber to force a minimum version of log4j due to CVE-2021-44228 without having to bring in additional plugins just to parse a version string:
Looks like
org.gradle.util.VersionNumber
was deprecated and moved to an internal class in 7.1. Is there any replacement which plugin authors can use that will survive the switch to 8.0?This class always came in super handy when working with various version numbers, so I'd be sad to see it go without any replacement.
The text was updated successfully, but these errors were encountered: