Any idea how to obtain the source code for Kotlin's stdlib?
In the screencap below, I don't have any option to download the source code like other maven libraries.
I'm using the following Kotlin dependency:
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.2.30</version>
</dependency>
Go to Intellij Preferences -> Build, Execution, Deployment -> Kotlin Compiler. Update Language version and Api version to the one you wish. This should be the accepted answer.
Click Libraries tab 3. Pick library and click + icon 4. Find a JAR file containing sources. But in your case,( using maven as a build tool), IntelliJ will automatically download and attach available source to all libraries, no manual work needed.
For me it helps to change maven dependency on Kotlin in pom.xml from
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.2.30</version>
</dependency>
to
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.3.31</version>
</dependency>
</dependencies>
more info on adding Kotlin to project as maven dependency can be found here: https://kotlinlang.org/docs/reference/using-maven.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With