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:support-v4:26.1.0" 23 compile "com.android.support:support-v13:26.1.0" 24 compile "com.android.support:cardview-v7:26.1.0" 25 compile "com.android.support:appcompat-v7:26.1.0" 26 compile 'com.google.android.gms:play-services-wearable:11.4.0' 27 compile 'com.android.support:support-v13:26.1.0' 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 41 compileSdkVersion 26 42 43 buildToolsVersion "26.0.1" 44 45 defaultConfig { 46 minSdkVersion 18 47 targetSdkVersion 23 48 } 49 50 compileOptions { 51 sourceCompatibility JavaVersion.VERSION_1_7 52 targetCompatibility JavaVersion.VERSION_1_7 53 } 54 55 sourceSets { 56 main { 57 dirs.each { dir -> 58 java.srcDirs "src/${dir}/java" 59 res.srcDirs "src/${dir}/res" 60 } 61 } 62 androidTest.setRoot('tests') 63 androidTest.java.srcDirs = ['tests/src'] 64 65 } 66 67 } 68