1 2 buildscript { 3 repositories { 4 jcenter() 5 } 6 7 dependencies { 8 classpath 'com.android.tools.build:gradle:2.1.2' 9 } 10 } 11 12 apply plugin: 'com.android.application' 13 14 15 repositories { 16 jcenter() 17 } 18 19 dependencies { 20 compile 'com.google.android.gms:play-services-wearable:8.4.0' 21 compile 'com.android.support:support-v13:24.1.1' 22 compile project(':Shared') 23 wearApp project(':Wearable') 24 } 25 26 // The sample build uses multiple directories to 27 // keep boilerplate and common code separate from 28 // the main sample code. 29 List<String> dirs = [ 30 'main', // main sample code; look here for the interesting stuff. 31 'common', // components that are reused by multiple samples 32 'template'] // boilerplate code that is generated by the sample template process 33 34 android { 35 compileSdkVersion 24 36 37 buildToolsVersion "24.0.1" 38 39 defaultConfig { 40 minSdkVersion 18 41 targetSdkVersion 24 42 versionCode 1 43 versionName "1.0" 44 } 45 46 compileOptions { 47 sourceCompatibility JavaVersion.VERSION_1_7 48 targetCompatibility JavaVersion.VERSION_1_7 49 } 50 51 sourceSets { 52 main { 53 dirs.each { dir -> 54 java.srcDirs "src/${dir}/java" 55 res.srcDirs "src/${dir}/res" 56 } 57 } 58 androidTest.setRoot('tests') 59 androidTest.java.srcDirs = ['tests/src'] 60 61 } 62 63 } 64