title: how to execute "gradle publishToMavenLocal" from bulid.gradle file in android library
body: <p>I would like to publish my android library to maven repo ( for now only local repository) so i use <code>maven-publish</code> plugin and use terminal <code>gradle publishToMavenLocal</code> command to do that.</p>
  
  <p>Is there any possibility to add that command to build.gradle so the publishing task will trigger always on build?</p>
  
  <p>And the second question, is there any possibility to add dependency to pom file automatically from aar , because gradle dont do that by default, for now I'm using solution found here
  <a href="https://stackoverflow.com/questions/24743562/gradle-not-including-dependencies-in-published-pom-xml/24764713#24764713">Gradle not including dependencies in published pom.xml</a>.</p>
  
  <p>Cheers
  Wojtek</p>