from Groovy to Kotlin, what is ```run { enviro...
# community-support
g
from Groovy to Kotlin, what is
Copy code
run {
    environment("TF_CPP_MIN_LOG_LEVEL", "1") // turn off TensorFlow print out
    systemProperties System.getProperties()
    systemProperties.remove("user.dir")
    systemProperty("file.encoding", "UTF-8")
}
?
c
Limited context as to what
run
is; perhaps that is a run task, which can be accessed via
tasks.named<Type>("run")
(
Type
is a placeholder for whatever type the run task is). The rest of it is almost there, other than brackets around
System.getProperties()
n
Just a heads-up: gradle support warned me about
systemProperties System.getProperties()
. It's really dangerous to just copy over all system properties to a task invocation. You should really be specific about the properties you'd like to expose inside the task, or you might get very strange issues.
👍 1
☝️ 1