title: How to use pom file in Android Gradle build?
body: <p>I'm using an Android Gradle command line, not Android Studio, build
  and I'd like to be able to build/compile in a library
  from mavenCentral().</p>
  
  <p>I'd like to know how to be able to do that for any general
  library, but one thing I want is to get a certain version
  of 'com.google.android.gms:play-services-maps' for my build.</p>
  
  <p>From:   <a href="https://mvnrepository.com/artifact/com.google.android.gms/play-services-maps" rel="nofollow noreferrer">https://mvnrepository.com/artifact/com.google.android.gms/play-services-maps</a></p>
  
  <p>I can, for most versions, get the pom and the aar files
  so what do I have to do in my build.gradle, if I have access to these files,
  to get it to build in the project?</p>
  
  <p>Most articles I saw are about how to generate a pom file,
  but not about how to use one in your project.</p>
  
  <p>I'd really like to know how to just use a pom file in my build
  or how to use the information from it, but if I can get info on how to build using the aar file, that would be cool too.</p>
  
  <p>Or how to use the information it gives in the 'Gradle' tab:</p>
  
  <pre><code>// https://mvnrepository.com/artifact/com.google.android.gms/play-services-maps
  compile group: 'com.google.android.gms', name: 'play-services-maps', version: '12.0.0'
  </code></pre>
  
  <p>This is what I currently have, many things omitted, that doesn't work:</p>
  
  <pre><code>&gt; Could not resolve all dependencies for configuration ':_debugApkCopy'.
      &gt; Could not find com.google.android.gms:play-services-maps:12.0.0.
          Searched in the following locations:
  
  
  buildscript {
      repositories {
          mavenCentral()
      }
  }
  
  dependencies {
      //compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.google.android.gms:play-services-maps:12.0.0'
  }
  </code></pre>
  
  <p>I've also tried using the info from the 'Gradle' tab:</p>
  
  <pre><code>repositories {
      maven {
          url "https://mvnrepository.com/artifact/com.google.android.gms/play-services-maps"
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>dependencies {
      compile group: 'com.google.android.gms', name: 'play-services-maps', version: '12.0.0'
  }
  </code></pre>
  
  <p>Thanks!</p>