I'm trying to compile simple Kotlin Gradle script. I've created a project in Idea with build.gradle.kts with following contents:
group = "org.example"
version = "1.0-SNAPSHOT"
tasks {
register("runScript", Copy::class) {
from("data")
into("out")
}
}
It was inspired by copy sample inside gradle/kotlin-dsl repository and it's not compiling either from IDE or gradlew in terminal. It gives me these errors:
e: /Users/dalexiv/Workspace/script-zipper/build.gradle.kts:5:5: Unresolved reference: register
e: /Users/dalexiv/Workspace/script-zipper/build.gradle.kts:5:27: Unresolved reference: Copy
e: /Users/dalexiv/Workspace/script-zipper/build.gradle.kts:6:9: Unresolved reference: from
e: /Users/dalexiv/Workspace/script-zipper/build.gradle.kts:7:9: Unresolved reference: into
Maybe I missing some kind of plugin to include? How do I do that?