gradledirectoryresourcesoutputsource-sets

gradle get resources default output directory


Gradle: how to get default resources output dir?

println sourceSets.main.resources.outputDir

Error:

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

Solution

  • Try this :

    println sourceSets.main.output.resourcesDir
    

    Source