This is a script that has the purpose of generating the kls-classpath file from a Kotlin script for kscript, using an unofficial function of the kscript command itself (kscript --dependencies <script kotlin>
), which is proposed in this PR.
/path/to/script/ksdeps <script kotlin>
This script collects the dependencies returned by kscript and adds both the kotlin stdlib as exemplified here and metadata annotations for kscript, more information here.