title: Adding dependency only to specific flavour - Android Studio
body: <p>My project has a free and paid version,</p>
  
  <p>Free version uses Admob service but paid version does not have any ad.
   How can i remove the dependency for paid version </p>
  
  <p>This is my build.gradle file</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          applicationId "com.udacity.gradle.builditbigger"
          minSdkVersion 10
          targetSdkVersion 22
          versionCode 1
          versionName "1.0"
          testApplicationId"com.udacity.gradle.builditbigger.tests"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      productFlavors{
          free{
              applicationId"com.udacity.gradle.builditbigger.flavours.free"
          }
          paid{
  
              applicationId"com.udacity.gradle.builditbigger.flavours.paid"
          }
  
  
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      // Added for AdMob
  
      compile project(':mylibrary')
      compile project(path: ':endpoint-backend', configuration: 'android-endpoints')
      compile 'com.android.support:appcompat-v7:22.2.0'
  
  
          compile 'com.google.android.gms:play-services:7.5.0'
  
  
  }
  </code></pre>
  
  <p>I want the dependency  compile 'com.google.android.gms:play-services:7.5.0' only for free version but not for the paid version .</p>