Alexander Lucas | d06812f | 2013-11-21 12:45:31 -0800 | [diff] [blame] | 1 | |
| 2 | |
| 3 | |
| 4 | buildscript { |
| 5 | repositories { |
| 6 | mavenCentral() |
| 7 | } |
| 8 | |
| 9 | dependencies { |
Alexander Lucas | a1a0039 | 2014-02-06 14:42:27 -0800 | [diff] [blame] | 10 | classpath 'com.android.tools.build:gradle:0.8.+' |
Alexander Lucas | d06812f | 2013-11-21 12:45:31 -0800 | [diff] [blame] | 11 | } |
| 12 | } |
| 13 | |
| 14 | apply plugin: 'android' |
| 15 | |
| 16 | dependencies { |
Alexander Lucas | 97842ff | 2014-03-07 14:56:55 -0800 | [diff] [blame^] | 17 | |
| 18 | // Add the support lib that is appropriate for SDK 4 |
Alexander Lucas | a1a0039 | 2014-02-06 14:42:27 -0800 | [diff] [blame] | 19 | compile "com.android.support:support-v4:19.0.+" |
Alexander Lucas | 97842ff | 2014-03-07 14:56:55 -0800 | [diff] [blame^] | 20 | |
| 21 | |
Alexander Lucas | d06812f | 2013-11-21 12:45:31 -0800 | [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 { |
| 33 | compileSdkVersion 19 |
Alexander Lucas | 97842ff | 2014-03-07 14:56:55 -0800 | [diff] [blame^] | 34 | |
Alexander Lucas | a1a0039 | 2014-02-06 14:42:27 -0800 | [diff] [blame] | 35 | buildToolsVersion "19.0.1" |
Alexander Lucas | d06812f | 2013-11-21 12:45:31 -0800 | [diff] [blame] | 36 | |
| 37 | sourceSets { |
| 38 | main { |
| 39 | dirs.each { dir -> |
| 40 | java.srcDirs "src/${dir}/java" |
| 41 | res.srcDirs "src/${dir}/res" |
| 42 | } |
| 43 | } |
| 44 | instrumentTest.setRoot('tests') |
| 45 | instrumentTest.java.srcDirs = ['tests/src'] |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |