1 2 3 4 buildscript { 5 repositories { 6 mavenCentral() 7 } 8 9 dependencies { 10 classpath 'com.android.tools.build:gradle:0.8.+' 11 } 12 } 13 14 apply plugin: 'android' 15 16 dependencies { 17 // Add the support lib that is appropriate for SDK 7 18 compile "com.android.support:support-v4:19.0.+" 19 compile "com.android.support:gridlayout-v7:19.0.+" 20 compile "com.android.support:appcompat-v7:+" 21 } 22 23 // The sample build uses multiple directories to 24 // keep boilerplate and common code separate from 25 // the main sample code. 26 List<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 31 android { 32 compileSdkVersion 19 33 buildToolsVersion "19.0.1" 34 35 sourceSets { 36 main { 37 dirs.each { dir -> 38 java.srcDirs "src/${dir}/java" 39 res.srcDirs "src/${dir}/res" 40 } 41 } 42 instrumentTest.setRoot('tests') 43 instrumentTest.java.srcDirs = ['tests/src'] 44 } 45 } 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61