how do i enable kotlin-DSL in a multi platform pro...
# gradle
s
how do i enable kotlin-DSL in a multi platform project as i get
Copy code
e: /home/macropreprocessor/IdeaProjects/kpp/buildSrc/src/main/kotlin/directoryembedder.gradle.kts: (1, 1): Unresolved reference: tasks
Copy code
/home/macropreprocessor/IdeaProjects/kpp/buildSrc/src/main/kotlin/directoryembedder.gradle.kts: (1, 1): Cannot access script base class 'kotlin.script.templates.standard.ScriptTemplateWithArgs'. Check your module classpath for missing or conflicting dependencies
Copy code
tasks {
    register("directoryEmbedder") {
        group = "Directory Embedder"
        description = "Directory Embedder"
        doLast {
            println("hello from Directory Embedder")
        }
    }
}
s
your
buildSrc/build.gradle.kts
needs to have the
kotlin-dsl
plugin applied
your root build.gradle is not the same as your
buildSrc
gradle.
g
Yeah, it should work if you have kotlin-dsl plugin applied