https://kotlinlang.org logo
#scripting
Title
# scripting
e

elect

07/14/2022, 4:52 AM
I see that the docs suggest to have two modules, "host" and "script-definition":
With all of this in mind, it’s best to split the project into two modules.
while in the example of Oliveira mentioned above he has definition and host inside one single module. And the same is the
simple-main-kts
inside "kotlin-script-examples". Is there any specific reason to have them splitted?
i

ilya.chernikov

07/20/2022, 7:06 AM
You can reuse the script definition part in other scenarios, e.g. for IntelliJ plugin, where the host part would be useless (and even may cause some conflicts). But the split is not ideal, it still mixes things that needed for script compilation and script runtime, so we might change the recommendation in the future.
👍 1
4 Views