Skip to content
Kaidan Gustave edited this page Jan 16, 2018 · 9 revisions

Because JDA-Utilities is dependent on the JDA library itself, projects making use of it must also setup and provide JDA in their project.

The "Using A Dependency Manager" tab below provides a basic setup that includes both JDA and JDA-Utilities.

If you are still unsure how to setup JDA, visit the setup page of the JDA wiki here.

Using A Dependency Manager

The necessary snippets for adding JDA-Utilities as a dependency in a Gradle or Maven project can be found below.

Replace LATEST with the corresponding JDA and JDA-Utilities version numbers, and you'll be good to go after refreshing your dependencies.

Using Gradle

If you use gradle as a dependency manager you'll need to do the following:

  • Add this to your repositories block.

    repositories {
      jcenter()
    }
  • Add these to your dependencies block:

    dependencies {
      compile 'com.jagrosh:jda-utilities:LATEST'
      compile 'net.dv8tion:JDA:LATEST'
    }

Using Maven

If you use maven as a dependency manager you'll need to do the following:

  • Add this to your <repositories> block:

      <repository>
        <id>central</id>
        <name>bintray</name>
        <url>http://jcenter.bintray.com</url>
      </repository>
  • Add these to your <dependencies> block:

      <dependency>
        <groupId>com.jagrosh</groupId>
        <artifactId>jda-utilities</artifactId>
        <version>LATEST</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>net.dv8tion</groupId>
        <artifactId>JDA</artifactId>
        <version>LATEST</version>
      </dependency>

Downloading Specific Modules

Since JDA-Utilities 2.0, the library has been split into multiple modular projects, in order to better organize it's contents based on what developers might want to use and not use.

Individual modules can be downloaded using the same structure shown above, with the addition of the module's name as a suffix to the dependency:

With maven:

  <dependency>
    <groupId>com.jagrosh</groupId>
    <!-- Notice that the dependency notation ends with "-command" -->
    <artifactId>jda-utilities-command</artifactId>
    <version>2.0</version>
    <scope>compile</scope>
  </dependency>

With gradle:

dependencies {
    // Notice that the dependency notation ends with "-command"
    compile 'com.jagrosh:jda-utilities-command:2.0'
}

Visit individual modules to read more about their contents!

Without A Dependency Manager

If you do not use a dependency manager, you'll need to download the latest versions of the following: