1
2buildscript {
3    repositories {
4        jcenter()
5    }
6
7    dependencies {
8        classpath 'com.android.tools.build:gradle:2.1.2'
9    }
10}
11
12apply plugin: 'com.android.application'
13
14
15dependencies {
16
17    compile "com.android.support:support-v4:24.0.0-beta1"
18    compile "com.android.support:support-v13:24.0.0-beta1"
19    compile "com.android.support:cardview-v7:24.0.0-beta1"
20
21}
22
23// The sample build uses multiple directories to
24// keep boilerplate and common code separate from
25// the main sample code.
26List<String> dirs = [
27    'main',     // main sample code; look here for the interesting stuff.
28    'common',   // components that are reused by multiple samples
29    'template'] // boilerplate code that is generated by the sample template process
30
31android {
32    compileSdkVersion 24
33    buildToolsVersion "23.0.3"
34
35    defaultConfig {
36        minSdkVersion 21
37        targetSdkVersion 24
38    }
39
40    compileOptions {
41        sourceCompatibility JavaVersion.VERSION_1_7
42        targetCompatibility JavaVersion.VERSION_1_7
43    }
44
45    sourceSets {
46        main {
47            dirs.each { dir ->
48                java.srcDirs "src/${dir}/java"
49                res.srcDirs "src/${dir}/res"
50            }
51        }
52        androidTest.setRoot('tests')
53        androidTest.java.srcDirs = ['tests/src']
54
55    }
56
57}
58