tasks {
val deploy by registering {
doLast {
ssh.run(closureOf<RunHandler> {
session(devServer, closureOf<SessionHandler> {
put(hashMapOf(
"from" to outputJar.single(),
"into" to prop("sshDeployPath")
))
})
})
}
}
}
gives error
> Parameter specified as non-null is null: method Build_gradle$5$deploy$2$1.execute$lambda$0, parameter $this$closureOf
When changed to:
tasks {
val deploy by registering {
doLast {
ssh.run(closureOf<RunHandler?> {
println("RunHandler: $this")
// ...
it logs:
tasks { val deploy by registering { doLast { ssh.run(closureOf<RunHandler> { session(devServer, closureOf<SessionHandler> { put(hashMapOf( "from" to outputJar.single(), "into" to prop("sshDeployPath") )) }) }) } } }gives error
When changed to:
tasks { val deploy by registering { doLast { ssh.run(closureOf<RunHandler?> { println("RunHandler: $this") // ...it logs: