title: Accessing Dependency from Artifactory using Gradle
body: <p>I have an artifact that has been published to my local Artifactory repository and now I am trying to pull that artifact into a project with gradle.</p>
  
  <p>However, I keep getting the following error:</p>
  
  <pre><code>* What went wrong:
  A problem occurred configuring project ':app'.
  &gt; Could not resolve all dependencies for configuration ':app:_debugCompile'.
  &gt; Could not find com.company.app:myapplication:1.0.0.
       Searched in the following locations:
       https://jcenter.bintray.com/com/company/app/...pom
       https://jcenter.bintray.com/com/company/app/...jar
  
       file:/Users/user/Library/Android/sdk/extras/android/m2repository/com/company/app...pom
       file:/Users/user/Library/Android/sdk/extras/android/m2repository/com/company/app...jar
       file:/Users/user/Library/Android/sdk/extras/google/m2repository/com/company/app...pom
       file:/Users/user/Library/Android/sdk/extras/google/m2repository/com/company/app....jar
  </code></pre>
  
  <p>This error suggests that it's not even looking at the local artifactory repository. Below are my <code>build.gradle</code> files</p>
  
  <hr>
  
  <h2>Project Level <code>build.gradle</code></h2>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          maven {
              url '${artifactory_contextUrl}/libs-release-local'
              credentials {
                  username = "${artifactory_user}"
                  password = "${artifactory_password}"
              }
          }
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:1.1.0'
          classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.0"
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <h2>App Level <code>build.gradle</code></h2>
  
  <pre><code>allprojects{
      apply plugin: "com.jfrog.artifactory"
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.company.app:myapplication:1.0.0'
  }
  </code></pre>