title: Add GitHub library as dependency to Android Studio project
body: <p>I am trying to implement ActionBar-PullToRefresh from <a href="https://github.com/chrisbanes/ActionBar-PullToRefresh/wiki/QuickStart-ABC" rel="nofollow noreferrer">https://github.com/chrisbanes/ActionBar-PullToRefresh/wiki/QuickStart-ABC</a>. I just made the switch from Eclipse to Android Studio so I am totally new to AS and Gradle.</p>
  <p>chrisbanes writes on the site:</p>
  <blockquote>
  <p>The easiest way to add ActionBar-PullToRefresh to your project is via
  Gradle, you just need to add the following dependency to your
  build.gradle:</p>
  </blockquote>
  <pre><code>dependencies {  
      mavenCentral()
      compile 'com.github.chrisbanes.actionbarpulltorefresh:extra-abc:+'
  }
  </code></pre>
  <p>Does this mean that I don't have to download the library and Gradle takes care of it so that I always have the latest version? I just don't know where to put the above line. I have two gradle.build files one in my root that looks like:</p>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.8.+'
      }
  }
  </code></pre>
  <p>and the one in my project which looks like:</p>
  <pre><code>apply plugin: 'android'
  
  dependencies {
      compile fileTree(dir: 'libs', include: '*.jar')
      compile 'com.android.support:support-v4:18.0.+'
      compile 'com.android.support:appcompat-v7:18.0.+'
  }
  
  android {
      compileSdkVersion 19
      buildToolsVersion &quot;19.0.1&quot;
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['src']
              aidl.srcDirs = ['src']
              renderscript.srcDirs = ['src']
              res.srcDirs = ['res']
              assets.srcDirs = ['assets']
          }
  
          // Move the tests to tests/java, tests/res, etc...
          instrumentTest.setRoot('tests')
  
          // Move the build types to build-types/&lt;type&gt;
          // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
          // This moves them out of them default location under src/&lt;type&gt;/... which would
          // conflict with src/ being used by the main source set.
          // Adding new build types or product flavors should be accompanied
          // by a similar customization.
          debug.setRoot('build-types/debug')
          release.setRoot('build-types/release')
      }
  }
  </code></pre>
  <p>Do I have to add a repository somewhere?</p>