gradle get资源默认输出目录

时间:2017-06-27 20:48:12

标签: gradle directory resources output source-sets

Gradle:如何获取默认资源输出目录?

println sourceSets.main.resources.outputDir

错误:

Needs to set a non-null value before it can be retrieved

1 个答案:

答案 0 :(得分:9)

试试这个:

println sourceSets.main.output.resourcesDir

Source