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