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 22 23 dependencies { 24 25 26 27 compile 'com.google.android.gms:play-services-wearable:11.4.0' 28 compile 'com.android.support:support-v13:26.1.0' 29 30 provided 'com.google.android.wearable:wearable:2.0.5' 31 32 compile 'com.google.android.support:wearable:2.0.5' 33 34 } 35 36 // The sample build uses multiple directories to 37 // keep boilerplate and common code separate from 38 // the main sample code. 39 List<String> dirs = [ 40 'main', // main sample code; look here for the interesting stuff. 41 'common', // components that are reused by multiple samples 42 'template'] // boilerplate code that is generated by the sample template process 43 44 android { 45 46 compileSdkVersion 26 47 48 buildToolsVersion "26.0.1" 49 50 defaultConfig { 51 versionCode 1 52 versionName "1.0" 53 54 minSdkVersion 24 55 56 targetSdkVersion 25 57 58 59 } 60 61 compileOptions { 62 sourceCompatibility JavaVersion.VERSION_1_7 63 targetCompatibility JavaVersion.VERSION_1_7 64 } 65 66 sourceSets { 67 main { 68 dirs.each { dir -> 69 java.srcDirs "src/${dir}/java" 70 res.srcDirs "src/${dir}/res" 71 } 72 } 73 androidTest.setRoot('tests') 74 androidTest.java.srcDirs = ['tests/src'] 75 76 } 77 } 78