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:gridlayout-v7:23.0.0" 21 compile "com.android.support:cardview-v7:23.0.0" 22 compile 'com.android.support:appcompat-v7:21.0.2' 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 23 35 buildToolsVersion "23.0.0" 36 37 defaultConfig { 38 minSdkVersion 7 39 targetSdkVersion 23 40 } 41 42 compileOptions { 43 sourceCompatibility JavaVersion.VERSION_1_7 44 targetCompatibility JavaVersion.VERSION_1_7 45 } 46 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 } 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75