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