Rajuda
Rajuda

Reputation: 21

How to add dependency to Kotlin compiler without using Gradle?

I want to add kotlinx.coroutines to the command-line compiler of the Kotlin so that i can import it without using Gradle. For example, I have a file Main.kt and no Gradle tool for Kotlin. Just look at the window below.

IDE window

I tried searching on YouTube, StackOverflow, Reddit, Google and GitHub but it didn't solve my problem.

Upvotes: 2

Views: 1240

Answers (1)

Cisco
Cisco

Reputation: 23042

You will need to use the Kotlin compiler directly:

https://kotlinlang.org/docs/command-line.html

In addition, to use kotlinx.coroutines, you will need to have these JARs locally and add them to the classpath to the Kotlin compiler:

https://kotlinlang.org/docs/compiler-reference.html#classpath-path-cp-path

Upvotes: 1

Related Questions