However in a plain IntelliJ project it's possible to get that library from Maven Central almost without hassle:
- Open project structure
- In the "Modules" page select a module which you use as a context of the scratch file (I suppose there will be just one module).
- Switch to "Dependencies" tab and hit the plus button.
- then in a context menu select "Library" -> "From Maven"
- paste maven coordinates of the kotlinx.coroutines library artifact:
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3
where 1.3.3 is the version of that library. You can find the latest available version here: https://github.com/Kotlin/kotlinx.coroutines/blob/master/README.md
- be sure to check "Transitive dependencies" and "Sources" boxes.
After hitting OK the library will be downloaded from Maven Central repository with all its dependencies and added to your module. Then it will be possible to use runBlocking in your project or scratch files.