title: in gradle build.gradle file - how can i check if a project exists?
body: <p>Let's say in a build.gradle file I want to do something like:</p>
  
  <p><code>ext.sharepointBuildDir = project(":MainProject:sharepoint").buildDir.path</code></p>
  
  <p>But in certain configurations that project may not exist.</p>
  
  <p>How can I check "does a gradle project exist"?</p>