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