blob: 6daf4a48563f759c1fdf200e3c8657b56b452199 [file] [log] [blame]
Xavier Ducrohet59917af2012-08-24 15:50:38 -07001//
2// A basic Android application that follows all the conventions
3//
4buildscript {
5 repositories {
Xavier Ducrohete9452202012-09-28 17:35:32 -07006 maven { url '../../repo' }
Xavier Ducrohet59917af2012-08-24 15:50:38 -07007 }
8 dependencies {
Xavier Ducrohet3fe7c572012-10-09 12:12:41 -07009 classpath 'com.android.tools.build:gradle:0.3-SNAPSHOT'
Xavier Ducrohet59917af2012-08-24 15:50:38 -070010 }
11}
12apply plugin: 'android'
13
Xavier Ducrohet59917af2012-08-24 15:50:38 -070014android {
15 target = "android-15"
Xavier Ducrohet205868b2012-08-27 14:02:11 -070016 testBuildType = "staging"
17
Xavier Ducrohet59917af2012-08-24 15:50:38 -070018
Xavier Ducrohet205868b2012-08-27 14:02:11 -070019 defaultConfig {
20 signingStoreLocation = "debug.keystore"
21 signingStorePassword = "android"
22 signingKeyAlias = "androiddebugkey"
23 signingKeyPassword = "android"
Xavier Ducrohet94d5c802012-08-31 11:37:48 -070024
25 buildConfig "private final static boolean DEFAULT = true;", \
26 "private final static String FOO = \"foo\";"
27
Xavier Ducrohet205868b2012-08-27 14:02:11 -070028 }
Xavier Ducrohet59917af2012-08-24 15:50:38 -070029
Xavier Ducrohet205868b2012-08-27 14:02:11 -070030 productFlavors {
31 f1 {
32 packageName = "com.android.tests.flavored.f1"
Xavier Ducrohet94d5c802012-08-31 11:37:48 -070033 buildConfig "private final static String FLAVOR = \"f1\";"
Xavier Ducrohet205868b2012-08-27 14:02:11 -070034 }
35 f2 {
36 packageName = "com.android.tests.flavored.f2"
Xavier Ducrohet94d5c802012-08-31 11:37:48 -070037 buildConfig "private final static String FLAVOR = \"f2\";"
Xavier Ducrohet205868b2012-08-27 14:02:11 -070038 }
39 }
40
41 buildTypes {
42 debug {
43 packageNameSuffix = ".debug"
Xavier Ducrohet94d5c802012-08-31 11:37:48 -070044 buildConfig "private final static boolean DEBUG2 = false;"
Xavier Ducrohet205868b2012-08-27 14:02:11 -070045 }
46 staging {
47 packageNameSuffix = ".staging"
48 debugSigned = true
49 }
50 }
Xavier Ducrohet59917af2012-08-24 15:50:38 -070051}