Add plugin.yml library support.
Recently Bukkit got a new
library api, where runtime dependencies can be declared in the plugin.yml.
To ease the jump from a JavaPlugin to a ScalaPlugin, ScalaLoader supports this setting too now.
It comes with four benefits over Bukkit's own implementation:
- Bytecode transformations needed for legacy plugin support will get applied for dependencies too. So,for example if a dependency calls Material#values() then only the modern Materials well be returned.
- In addition to Maven Central, the CodeMC maven-public repository is supported out of the box as well!
- It works on all versions of spigot supported by ScalaLoader. That is Spigot 1.8.8 and newer.
- Dependencies that have the Scala standard library as a transitive dependency will use the Scala standard library that was loaded by ScalaLoader at runtime, ensuring that multiple ScalaPlugins remain free to exchange types from the Scala standard library to other ScalaPlugins without class clashes.
Note that this update is meant to ease the migration from a JavaPlugin to a ScalaPlugin. Eventually ScalaLaoder will get its own dependency api according to the design described
here.
Cheers!