在Kotlin脚本中用扩展方法问题
我正在尝试用于Gradle配置的Kotlin脚本。 从build.gradle.kts
:
val deployTest = System.getProperty("deployTest").toBoolean()
运行:
gradle clean build
它适用于我的本地工作站,但在TeamCity上失败:
IllegalStateException: Error type encountered: [ERROR : Type for (System.getProperty("deployTest") as String).toBoolean()] (DeferredType)
属性deployTest
没有在我的工作站或TC上设置。 而在我的工作站上,它返回false
。 它出什么问题了?