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