task check << {
    allprojects {
        println "project path $path"
        println "  project name = $name"
        println "  project dir = '${toPath(projectDir)}'"
        println "  build file = '${toPath(buildFile)}'"
        println "  build dir = '${toPath(buildDir)}'"
    }
}

def toPath(File file) {
    rootProject.relativePath(file).path.replaceAll(java.util.regex.Pattern.quote(File.separator), '/')
}
