kotlinc -classpath /home/hoge/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.6.4/2c997cd1c0ef33f3e751d3831929aeff1390cb30/kotlinx-coroutines-core-jvm-1.6.4.jar c001.kt -include-runtime -d c001.jar
コンパイルは出来ましたが
Exception in thread "main" java.lang.NoClassDefFoundError: kotlinx/coroutines/GlobalScope
at C001Kt.main(c001.kt:4)
at C001Kt.main(c001.kt)
Caused by: java.lang.ClassNotFoundException: kotlinx.coroutines.GlobalScope
...

chatgptに聞いたりググったりして
gradle init --dsl kotlin
2 enter 4 enter ...
などとしてみてapp/build.gradle.ktsのdependenciesに
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
を書いて./gradlew runしてみましたが
> Task :app:compileKotlin
w: file:///hoge/kt/c001/app/src/main/kotlin/c001/App.kt:4:5 This is a delicate API and its use requires care. Make sure you fully read and understand documentation of the declaration that is marked as a delicate API.

そもそもkotlinx.coroutines.*とkotlin.coroutines.*があるようですが
コンソールアプリで使えるのは後者なのでしょうか
もしそうだとすると上のサンプルコード自体コンソールでは使えないかもしれません

色々試してみていますがまだうまく動かせていません
初心者すぎてすいません