I'm trying Kotlin script for gradle configuring. Line from build.gradle.kts
:
val deployTest = System.getProperty("deployTest").toBoolean()
Running:
gradle clean build
It works well on my local workstation but fails on TeamCity:
IllegalStateException: Error type encountered: [ERROR : Type for (System.getProperty("deployTest") as String).toBoolean()] (DeferredType)
Property deployTest
is not set on my workstation nor on TC. And on my workstation it returns false
. What's wrong with it?