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