title: How to fetch Nexus repository file into android app
body: <p>I want to define gradle dependencies for the .aar file of my module, which is already uploaded on nexus repository. Now I am trying to declare dependency for the same .aar file into gradle file of my android application, but not able to fetch the .aar file from Nexus repository.</p>
  
  <p>I am using below entry inside build.gradle file of android application:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          maven {
              url 'https://MY_COMPANY_DOMAIN/nexus/content/repositories/MY_PROJECT-Releases/'
          }
      }
  }
  
  dependencies {
      compile 'GROUP_NAME:FILE_NAME:VERSION_NUMBER'
  }
  </code></pre>
  
  <p>After building my project, I am getting below error:</p>
  
  <pre><code>"Error:Could not find GROUP_NAME:FILE_NAME:VERSION_NUMBER.
  Required by:
      PROJECT_NAME:app:unspecified
  &lt;a&gt;Search in build.gradle files&lt;/a&gt;"
  </code></pre>
  
  <p>Note: In my case Nexus repository is secure, and we need to use credentials to access that repo. I think, we need to specify authentication data also somewhere inside gradle file. 
  Please suggest me, how can we define authentication section inside gradle to fetch .aar/.jar file from Nexus repo.</p>
  
  <p>Thanks,
  Sumeet.</p>