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