Take a look at kscript, which is a single-file wrapper around Kotlin that includes dependency specification in the script file: https://github.com/holgerbrandl/kscript
Example:
#!/usr/bin/env kscript
// Declare dependencies
@file:DependsOn(“com.offbytwo:docopt:0.6.0.20150202“)
import org.docopt.Docopt
val usage = “...”
val doArgs = Docopt(usage).parse(args.toList())
println("Hello from Kotlin!")
println("Parsed script arguments are: \n" + doArgs)
Example: