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