title: Optional Gradle dependencies for Maven libraries
body: <p>I'm working on an Android library and would like to use a dependency only if the project using my library includes that dependency as well. Similar to what <a href="https://github.com/square/picasso">Picasso</a> does with <a href="https://github.com/square/okhttp">OkHttp</a>.</p>
  
  <p>I already took care of this on the main code by checking for ClassNotFoundExceptions but it still includes the dependencies upon deploying it to Maven Central. How do I generate something such as Maven's <code>&lt;optional&gt;true&lt;/optional&gt;</code> tag?</p>
  
  <p>I'm using <a href="https://github.com/chrisbanes/gradle-mvn-push">gradle-mvn-push</a> to deploy my artifacts via Gradle.</p>