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