'Azure DevOps Pipeline - How to run Kotlin script - *.kts files

To run a Kotlin script one needs to execute:

kotlinc -script myScript.kts

Do I need to download the Kotlin command-line compiler to have access to it, or there is an easier way?



Solution 1:[1]

Kotlin scripting is the solution to this problem, but it is still experimental, and it didn't work for me very well.

I ended up using Gradle Kotlin DSL. Here is a nice samples repo to get you started fast.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ilya Gazman