728x90
dependencies {
    // Other dependencies...
    implementation 'com.slack.api:slack-java-api:2.10.0'
}

요로코롬 2.10.0 을 납치해주면 될 것 같지만 작동하지 않는다.

 

Gradle

Do you prefer using Gradle? Let’s try installing the library with Gradle. The steps are quite similar to Maven, but there are some differences.

build.gradle

Place build.gradle in the root directory of your Java project. We don’t have any requirements for Gradle versions.

plugins {
  id("application")
}
repositories {
  mavenCentral()
}
dependencies {
  implementation("com.slack.api:slack-api-client:1.30.0")
}
application {
  mainClassName = "Example"
}

As with the Maven section, let’s create a class named Example with the main method. Then, run it from your IDE or hit gradle run on your terminal. You’ll see the same stdout.

In summary, the things you’ve done here are:

  • ✅ JDK 8 or higher installed (if not, run brew install openjdk@11 for macOS / visit OpenJDK website for others)
  • ✅ Gradle installed (if not, run brew install gradle for macOS / visit their website for others)
  •  build.gradle having slack-api-client as a dependency
  •  src/main/java/Example.java with the main method

Gradle for Kotlin

 

 

위에처럼 1.30.0 에 대한 부분을 build.gradle 에 의존성 결과로 적용해준 이후에 import 할 수 있었다.

특히 코드에서 몇가지 없는 부분들이 있는데, 버전이 올라감에 따라서 .get method 등이 deprecated 되었다.

https://slack.dev/java-slack-sdk/guides/web-api-client-setup

 

Installation | Slack SDK for Java

API Client Installation The first step to using the Slack API client is installing the slack-api-client module. This guide shows you how to set up using Maven, Gradle, and by building from source on your own. Prerequisites Installing OpenJDK 8 or higher LT

slack.dev

 

+ Recent posts