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