Can someone explain to me what's the difference be...
# scripting
s
Can someone explain to me what's the difference between the
kotlinScriptDef
and
kotlinScriptDefExtensions
Gradle configurations, and which to use when?
I'm basically asking in the context of https://youtrack.jetbrains.com/issue/KTIJ-22806.
i
The
kotlinScriptDef
is a configuration that could be used to discover script definitions for compiling sources that include custom scripts. This configuration is provided and handled by the kotlin gradle plugin. I don't know whether it is handled properly on Import to intelliJ, but looking at the stacktrace from the issue, it seems that the attempt to instantiate the definition is made, so the definition is discovered. Maybe something is missing in the classpath.
I have no idea, what
kotlinScriptDefExtensions
is. It is defined in the gradle (kotlin-dsl) itself, but I see no documentation, and the purpose is not immediately clear from the source code. Maybe better asking Gradle gous about it.
👍🏻 1
s
that could be used
Can you clarify on the "could" bit? When does it have to be used? I.e., am I supposed to used it even if the script definitions already are in the
implementation
configuration?
i
Yes, sorry for the misleading formulation. If you need the definition to be discovered, you have to reference it in the
kotlinScriptDef
.
👍🏻 1