I am currently accessing the assets directory for a project as follows (where it
has type Project
):
SourceDirectorySet resources = it.sourceSets.main.resources
File file = resources.srcDirs.find { it.name == "assets" }
if (file != null) { ... }
Is this guaranteed to be correct? Or is there a better way (probably through android
)?