import org.gradle.api.Project

allprojects {
    task hello << {task -> println "I'm $task.project.name" }
}
subprojects {
    hello {
        doLast {println "- I depend on water"}
        afterEvaluate { Project project ->
            if (project.arctic) { doLast { println '- I love to spend time in the arctic waters.' }}
        }
    }
}

