Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 1 | // |
| 2 | // A basic Android application that follows all the conventions |
| 3 | // |
| 4 | buildscript { |
| 5 | repositories { |
Xavier Ducrohet | e945220 | 2012-09-28 17:35:32 -0700 | [diff] [blame] | 6 | maven { url '../../repo' } |
Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 7 | } |
| 8 | dependencies { |
Xavier Ducrohet | 3fe7c57 | 2012-10-09 12:12:41 -0700 | [diff] [blame^] | 9 | classpath 'com.android.tools.build:gradle:0.3-SNAPSHOT' |
Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 10 | } |
| 11 | } |
| 12 | apply plugin: 'android' |
| 13 | |
Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 14 | android { |
| 15 | target = "android-15" |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 16 | testBuildType = "staging" |
| 17 | |
Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 18 | |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 19 | defaultConfig { |
| 20 | signingStoreLocation = "debug.keystore" |
| 21 | signingStorePassword = "android" |
| 22 | signingKeyAlias = "androiddebugkey" |
| 23 | signingKeyPassword = "android" |
Xavier Ducrohet | 94d5c80 | 2012-08-31 11:37:48 -0700 | [diff] [blame] | 24 | |
| 25 | buildConfig "private final static boolean DEFAULT = true;", \ |
| 26 | "private final static String FOO = \"foo\";" |
| 27 | |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 28 | } |
Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 29 | |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 30 | productFlavors { |
| 31 | f1 { |
| 32 | packageName = "com.android.tests.flavored.f1" |
Xavier Ducrohet | 94d5c80 | 2012-08-31 11:37:48 -0700 | [diff] [blame] | 33 | buildConfig "private final static String FLAVOR = \"f1\";" |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 34 | } |
| 35 | f2 { |
| 36 | packageName = "com.android.tests.flavored.f2" |
Xavier Ducrohet | 94d5c80 | 2012-08-31 11:37:48 -0700 | [diff] [blame] | 37 | buildConfig "private final static String FLAVOR = \"f2\";" |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 38 | } |
| 39 | } |
| 40 | |
| 41 | buildTypes { |
| 42 | debug { |
| 43 | packageNameSuffix = ".debug" |
Xavier Ducrohet | 94d5c80 | 2012-08-31 11:37:48 -0700 | [diff] [blame] | 44 | buildConfig "private final static boolean DEBUG2 = false;" |
Xavier Ducrohet | 205868b | 2012-08-27 14:02:11 -0700 | [diff] [blame] | 45 | } |
| 46 | staging { |
| 47 | packageNameSuffix = ".staging" |
| 48 | debugSigned = true |
| 49 | } |
| 50 | } |
Xavier Ducrohet | 59917af | 2012-08-24 15:50:38 -0700 | [diff] [blame] | 51 | } |