android-build

How to define different dependencies for different product flavors

本小妞迷上赌 提交于 2019-11-26 04:35:46
问题 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

What is the difference between compileSdkVersion and targetSdkVersion?

≡放荡痞女 提交于 2019-11-26 00:13:29
问题 I have looked at the documentation for building with Gradle, but I\'m still not sure what the difference between compileSdkVersion and targetSdkVersion is. All it says is: The compileSdkVersion property specifies the compilation target. Well, what is the \"compilation target\"? I see two possible ways to interpret this: compileSdkVersion is the version of the compiler used in building the app, while targetSdkVersion is the \"API level that the application targets\". (If this were the case, I\