1 2 buildscript { 3 repositories { 4 jcenter() 5 } 6 7 dependencies { 8 classpath 'com.android.tools.build:gradle:1.2.3' 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:23.0.0" 20 compile "com.android.support:support-v13:23.0.0" 21 compile "com.android.support:cardview-v7:23.0.0" 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 23 34 buildToolsVersion "23.0.0" 35 36 defaultConfig { 37 minSdkVersion 16 38 targetSdkVersion 23 39 } 40 41 compileOptions { 42 sourceCompatibility JavaVersion.VERSION_1_7 43 targetCompatibility JavaVersion.VERSION_1_7 44 } 45 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 74