title: How to add dependencies to a kotlin library?
body: <p>I am trying to build a kotlin library for discord bots, which can be found at <a href="https://github.com/TheDrone7/discord-kt" rel="nofollow noreferrer">https://github.com/TheDrone7/discord-kt</a> , published to jcenter (bintray link - <a href="https://bintray.com/thedrone7/discordKt/discord-kt" rel="nofollow noreferrer">https://bintray.com/thedrone7/discordKt/discord-kt</a>). The library has a few dependencies of it's own as well.</p>
  
  <p>When I add my own library to my test app, the library's dependencies were not installed and I started getting some errors. Is there a way to specify the library's dependencies so that they get automatically installed when a user uses my library?</p>
  
  <p>EDIT: -</p>
  
  <p>So basically my test app's <code>build.gradle.kts</code> file's dependencies section is given below</p>
  
  <pre><code>dependencies {
      // Use the Kotlin JDK 8 standard library.
      implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
      implementation("org.theDrone:discordKt:0.0.1a")
  
      // Use the Kotlin test library.
      testImplementation("org.jetbrains.kotlin:kotlin-test")
  
      // Use the Kotlin JUnit integration.
      testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
  }
  </code></pre>
  
  <p>And my library is dependent on the following packages: -</p>
  
  <ul>
  <li>org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0</li>
  <li>org.java-websocket:Java-WebSocket:1.4.0</li>
  <li>com.beust:klaxon:5.0.5</li>
  <li>org.slf4j:slf4j-jdk14:1.7.26</li>
  </ul>
  
  <p>now when I run my test app, it shows gives error that there is no class named <code>WebSocketClient</code> which is a part of the <code>org.java-websocket:Java-WebSocket:1.4.0</code> package and is also the base of my entire library.</p>
  
  <p>When I add the listed packages to my test app's dependencies, it works perfectly fine. So is there a way that I could define in my library that the apps using it will also automatically depend on the packages my library depends on?</p>