Kotlin Script File Build Step
A build step running a Kotlin script with from a specified file
Example. Adds a Kotlin script build step with default Kotlin compiler and default JVM.
kotlinScript {
name = "My Kotlin Script step"
path = "script.kts"
}
Example. Adds a Kotlin script build step with bundled Kotlin compiler and custom JDK is set to the environment variable value with additional parameter. Additional agruments are passed to the Kotlin script with a reference to the configuration parameter value. Custom working directory is provided.
kotlinScript {
name = "My Kotlin Script step"
workingDir = "scripts/"
path = "script.kts"
compiler = "%teamcity.tool.kotlin.compiler.bundled%"
arguments = "%myscript.params%"
jdkHome = "%env.JDK_15_0%"
jvmArgs = "-Xmx2048m"
}
Example. Adds a Kotlin script build step with custom Kotlin compiler and custom JDK with additional parameter. Custom working directory is provided.
kotlinScript {
name = "My Kotlin Script step"
workingDir = "scripts/"
path = "script.kts"
compiler = "path/to/kotlin/compiler"
jdkHome = "path/to/jdk"
jvmArgs = "-Xmx2048m"
}
See also
Properties
Optional collection of build step execution conditions
Build step execution mode
Build working directory for the script, specify it if it is different from the checkout directory.
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Validates this object and reports found errors to the provided consumer