evaluationDependsOn(':producer')

key = 'unknown'
if (project(':producer').hasProperty('key')) {
    key = project(':producer').key
}
task consume(dependsOn: ':producer:produce') << {
    println "Consuming message from key '$key': " +  System.getProperty(key)
}
