Trevor Johns | 818bd7c | 2015-05-20 22:03:03 -0700 | [diff] [blame^] | 1 | |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 2 | buildscript { |
| 3 | repositories { |
Trevor Johns | 29e861b | 2014-12-01 14:56:41 -0800 | [diff] [blame] | 4 | jcenter() |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 5 | } |
| 6 | |
| 7 | dependencies { |
Trevor Johns | 40f8fbe | 2015-05-08 19:28:40 -0700 | [diff] [blame] | 8 | classpath 'com.android.tools.build:gradle:1.1.0' |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 9 | } |
| 10 | } |
| 11 | |
| 12 | apply plugin: 'com.android.application' |
| 13 | |
Trevor Johns | 29e861b | 2014-12-01 14:56:41 -0800 | [diff] [blame] | 14 | repositories { |
| 15 | jcenter() |
| 16 | } |
| 17 | |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 18 | dependencies { |
Trevor Johns | f485242 | 2014-12-11 14:22:56 -0800 | [diff] [blame] | 19 | compile "com.android.support:support-v4:21.0.2" |
| 20 | compile "com.android.support:support-v13:21.0.2" |
| 21 | compile "com.android.support:cardview-v7:21.0.2" |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | // The sample build uses multiple directories to |
| 25 | // keep boilerplate and common code separate from |
| 26 | // the main sample code. |
| 27 | List<String> dirs = [ |
| 28 | 'main', // main sample code; look here for the interesting stuff. |
| 29 | 'common', // components that are reused by multiple samples |
| 30 | 'template'] // boilerplate code that is generated by the sample template process |
| 31 | |
| 32 | android { |
Trevor Johns | 4de32d4 | 2015-04-22 20:19:58 -0700 | [diff] [blame] | 33 | compileSdkVersion 22 |
| 34 | buildToolsVersion "22.0.1" |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 35 | |
| 36 | defaultConfig { |
| 37 | minSdkVersion 18 |
Trevor Johns | 4de32d4 | 2015-04-22 20:19:58 -0700 | [diff] [blame] | 38 | targetSdkVersion 22 |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 39 | } |
| 40 | |
Trevor Johns | 40f8fbe | 2015-05-08 19:28:40 -0700 | [diff] [blame] | 41 | compileOptions { |
| 42 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 43 | targetCompatibility JavaVersion.VERSION_1_7 |
| 44 | } |
| 45 | |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 46 | sourceSets { |
| 47 | main { |
| 48 | dirs.each { dir -> |
| 49 | java.srcDirs "src/${dir}/java" |
| 50 | res.srcDirs "src/${dir}/res" |
| 51 | } |
| 52 | } |
| 53 | androidTest.setRoot('tests') |
| 54 | androidTest.java.srcDirs = ['tests/src'] |
| 55 | |
| 56 | } |
| 57 | |
| 58 | } |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |