KotlinScriptFileBuildStep
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
Constructors
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Creates an instance of this build step via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer
Properties
Build working directory for the script, specify it if it is different from the checkout directory.