1 2 buildscript { 3 repositories { 4 jcenter() 5 } 6 7 dependencies { 8 classpath 'com.android.tools.build:gradle:2.2.0' 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:25.0.1" 20 compile "com.android.support:gridlayout-v7:25.0.1" 21 compile "com.android.support:cardview-v7:25.0.1" 22 compile "com.android.support:appcompat-v7:25.0.1" 23 compile files('renderscript-v8.jar') 24 } 25 26 // The sample build uses multiple directories to 27 // keep boilerplate and common code separate from 28 // the main sample code. 29 List<String> dirs = [ 30 'main', // main sample code; look here for the interesting stuff. 31 'common', // components that are reused by multiple samples 32 'template'] // boilerplate code that is generated by the sample template process 33 34 android { 35 compileSdkVersion 25 36 buildToolsVersion "25.0.3" 37 38 defaultConfig { 39 minSdkVersion 8 40 targetSdkVersion 25 41 } 42 43 compileOptions { 44 sourceCompatibility JavaVersion.VERSION_1_7 45 targetCompatibility JavaVersion.VERSION_1_7 46 } 47 48 sourceSets { 49 main { 50 dirs.each { dir -> 51 java.srcDirs "src/${dir}/java" 52 res.srcDirs "src/${dir}/res" 53 } 54 } 55 androidTest.setRoot('tests') 56 androidTest.java.srcDirs = ['tests/src'] 57 58 defaultConfig { 59 60 renderscriptTargetApi 24 61 renderscriptSupportModeEnabled true 62 63 } 64 } 65 66 } 67