Kotlin-Scripting with Gradle dependencies
I learned that I can have a Kotlin-Script script.main.kts that declares dependencies like this:
@file:Repository("
https://jcenter.bintray.com")
@file:DependsOn("org.apache.pdfbox
pdfbox3.0.0-RC1")
import java.io.File
import org.apache.pdfbox.Loader
import org.apache.pdfbox.pdmodel.PDDocument
val pdfFile = File("example_041.pdf")
PDDocument.load(pdfFile)
and run it like this
kotlin script.main.kts
Great.
Now how would the minimal build.gradle.kts look like, that would allow me to manage...