1 2buildscript { 3 repositories { 4 jcenter() 5 google() 6 } 7 8 dependencies { 9 classpath 'com.android.tools.build:gradle:3.0.1' 10 } 11} 12 13apply plugin: 'com.android.application' 14 15repositories { 16 jcenter() 17 google() 18} 19 20dependencies { 21 compile 'com.android.support:wear:27.0.2' 22 compile 'com.google.android.gms:play-services-wearable:11.8.0' 23 compile 'com.android.support:support-v13:27.0.2' 24 25 provided 'com.google.android.wearable:wearable:2.2.0' 26 27 compile 'com.google.android.support:wearable:2.2.0' 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. 35List<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 40android { 41 42 compileSdkVersion 26 43 44 buildToolsVersion "27.0.2" 45 46 defaultConfig { 47 versionCode 1 48 versionName "1.0" 49 50 minSdkVersion 23 51 52 targetSdkVersion 26 53 54 multiDexEnabled true 55 56 } 57 58 compileOptions { 59 sourceCompatibility JavaVersion.VERSION_1_7 60 targetCompatibility JavaVersion.VERSION_1_7 61 } 62 63 sourceSets { 64 main { 65 dirs.each { dir -> 66 java.srcDirs "src/${dir}/java" 67 res.srcDirs "src/${dir}/res" 68 } 69 } 70 androidTest.setRoot('tests') 71 androidTest.java.srcDirs = ['tests/src'] 72 73 } 74} 75