title: How to change project build target in Android Gradle project
body: <p>I have project which needs to be ported in Gradle build, I have done most of work but not able to change the target SDK for the build, since my application is heavily dependent on third party SDK. It is present in addons directory of SDK manager.</p>
  
  <p>Here is the Eclipse project structure</p>
  
  <p><a href="https://i.stack.imgur.com/OhczE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OhczE.png" alt="eclipse structure"></a></p>
  
  <p>project build target in eclipse is</p>
  
  <h2><a href="https://i.stack.imgur.com/NuYKI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NuYKI.png" alt="project build target eclipse"></a></h2>
  
  <p>The Gradle project structure is </p>
  
  <p><a href="https://i.stack.imgur.com/aqtoJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aqtoJ.png" alt="gradle structure"></a></p>
  
  <p><strong>build.gradle</strong> in app directory</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          applicationId "com.name.appname"
          minSdkVersion 15
          targetSdkVersion 22
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      //compile 'com.android.support:appcompat-v7:22.2.1'
  }
  </code></pre>
  
  <p>I have following queries</p>
  
  <ol>
  <li><p>Where to make the changes in which file or directory?</p></li>
  <li><p>Do I need to add addon library sdk in the gradle build, If yes, then where??</p></li>
  </ol>
  
  <p><strong>Thank you for being helpful and down voting, at-least explain why you down voted.</strong></p>