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