重写什么会更加狂野
task envvar << {
all = System.getenv();
for (Map.Entry<String, String> entry : all.entrySet())
{
System.out.println(entry.getKey() + "/" + entry.getValue());
}
}
答案 0 :(得分:7)
task envvar << {
System.getenv().each { key, value -> println "${key}/${value}" }
}