Use Discord4J v3 instead!
This library was created for Discord4J v2 which is no longer supported or maintained.
A gradle plugin which allows for gradle builds to have Discord4J integration.
NOTE: This requires Discord4J to be added to your build.gradle
as a project dependency. See here for instructions on how to do that.
apply plugin: 'discord4j' //Applies the gradle plugin
discord { //This block allows you to configure the plugin
apiKey = "INSERT_API_KEY_HERE" //The bot token, this is used to log into a bot account when running the "modules" task
}
buildscript {
repositories {
maven { //This repository is required to apply the plugin
url "https://jitpack.io"
}
}
dependencies { //This adds the plugin as a dependency in your build script
classpath 'com.github.Discord4J-Addons:Discord4J-Gradle-Plugin:INSERT_VERSION_HERE'
}
}
Available tasks:
Task | Description |
---|---|
modules |
This packages your project and runs it as an external Discord4J module. |
cleanModules |
This cleans all files generated by the modules task. |