val buildDockerImage by creating(Exec::class) {
commandLine("docker", "build", "-t", ${someExtension.somePropertyState},, dockerDirectory)
doLast{println("executed $commandLine")}
}
I’m trying to figure out how to lazily set an argument in this exec task from a propertystate, but it’s evaluating too early.
Am I missing something?
fitzoh
08/28/2017, 1:35 PM
awesome, thanks for the heads up 👍
g
gildor
08/28/2017, 1:54 PM
@fitzoh yeah, gradle-docker-plugin is the best option.
But as solution for your original code, you can use afterEvaluate block to configure task after all other configs processed
f
fitzoh
08/28/2017, 1:57 PM
Yeah, I got that working with some help from @\bamboo, just had to set the