How to define different dependencies for different product flavors
问题 I am converting one of my apps to Gradle and would like to use the new build flavor features to have a paid and a free ad based flavor. I want only the ad based version to depend on the admob SDK. My build file looks like this: buildscript { repositories { mavenCentral() } dependencies { classpath \'com.android.tools.build:gradle:0.5.+\' } } apply plugin: \'android\' repositories { mavenCentral() } android { compileSdkVersion 18 buildToolsVersion \"18.0.1\" defaultConfig { minSdkVersion 10