Discord4J v3 uses a BOM or Bill of Materials as a way to coordinate dependencies that work well together, therefore providing faster and safer ways to migrate across versions.
To check available versions make sure you go to the BOM repo and then replace
3.0.x below with the adequate version.
Maven supports BOM through the
dependencyManagement entry. You should first add this snippet to your pom.xml file:
Then you are able to add dependencies just like normal ones, but without specifying the
Add the following to your build.gradle file to import the BOM, making sure replacing the version with the one you wish to use:
Finally, add the dependency as normal, without needing to specify the version:
You can also use SNAPSHOT and development builds from Jitpack with this BOM. You just have to also make sure you include the proper repository to pull the right dependencies: