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