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 | 8ef75db | 2016-06-15 10:56:34 -0700 | [diff] [blame] | 8 | classpath 'com.android.tools.build:gradle:2.1.2' |
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 | 8ef75db | 2016-06-15 10:56:34 -0700 | [diff] [blame] | 19 | compile "com.android.support:support-v4:24.0.0-beta1" |
| 20 | compile "com.android.support:support-v13:24.0.0-beta1" |
| 21 | compile "com.android.support:cardview-v7:24.0.0-beta1" |
| 22 | compile "com.android.support:appcompat-v7:24.0.0-beta1" |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | // The sample build uses multiple directories to |
| 26 | // keep boilerplate and common code separate from |
| 27 | // the main sample code. |
| 28 | List<String> dirs = [ |
| 29 | 'main', // main sample code; look here for the interesting stuff. |
| 30 | 'common', // components that are reused by multiple samples |
| 31 | 'template'] // boilerplate code that is generated by the sample template process |
| 32 | |
| 33 | android { |
| 34 | compileSdkVersion 21 |
Trevor Johns | 8ef75db | 2016-06-15 10:56:34 -0700 | [diff] [blame] | 35 | buildToolsVersion "23.0.3" |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 36 | |
| 37 | defaultConfig { |
| 38 | minSdkVersion 21 |
| 39 | targetSdkVersion 21 |
| 40 | } |
| 41 | |
Trevor Johns | 40f8fbe | 2015-05-08 19:28:40 -0700 | [diff] [blame] | 42 | compileOptions { |
| 43 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 44 | targetCompatibility JavaVersion.VERSION_1_7 |
| 45 | } |
| 46 | |
Trevor Johns | 684d2c1 | 2014-10-16 02:54:51 -0700 | [diff] [blame] | 47 | sourceSets { |
| 48 | main { |
| 49 | dirs.each { dir -> |
| 50 | java.srcDirs "src/${dir}/java" |
| 51 | res.srcDirs "src/${dir}/res" |
| 52 | } |
| 53 | } |
| 54 | androidTest.setRoot('tests') |
| 55 | androidTest.java.srcDirs = ['tests/src'] |
| 56 | |
| 57 | } |
| 58 | |
| 59 | } |