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