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