Updated Guice to 6.0.0 and manually include updated ASM #1016
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.
In this pull request, Guice was upgraded to version 6.0.0, which has no breaking changes from version 5.1.0. This version adds support for jakarta.inject as a future replacement for javax.inject (as of Guice 7.0.0 support for javax.inject is removed), and also updates its ASM dependency to support Java 21.
In addition, the ASM dependency is now manually included in Velocity, since according to a dependency analysis, Lmbda was including ASM version 7.1 while Guice declared version 9.5 (which has Java 21 support) as an optional dependency, so the Lmbda version was included.
This change has been tested with several plugins that use Guice in a basic way (a single use of the
@Inject
annotation in the main class), as well as in a more complete way (declaring custom Guice AbstractModules) and with other plugins that use both ways of declaring listeners as with the@Subscribe
annotation (which uses Lmbda and ASM) and the functional wayalso fixed an incorrect mention to the EventTask class in the error that arises when trying to register a listener by means of a method that has neither a void nor an EventTask as return type