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 8 18 compile "com.android.support:support-v4:19.0.+" 19 compile "com.android.support:gridlayout-v7:19.0.+" 20 compile files('renderscript-v8.jar') 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 defaultConfig { 46 47 renderscriptTargetApi 18 48 renderscriptSupportMode true 49 50 } 51 } 52 } 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68