1 2 3 4 buildscript { 5 repositories { 6 mavenCentral() 7 } 8 9 dependencies { 10 classpath 'com.android.tools.build:gradle:0.12.+' 11 } 12 } 13 14 apply plugin: 'com.android.application' 15 16 17 18 dependencies { 19 compile 'com.google.android.gms:play-services:5.0.+@aar' 20 compile 'com.android.support:support-v13:20.0.+' 21 compile 'com.google.android.support:wearable:1.0.+' 22 compile project(':Shared') 23 } 24 25 // The sample build uses multiple directories to 26 // keep boilerplate and common code separate from 27 // the main sample code. 28 List<String> dirs = [ 29 'main', // main sample code; look here for the interesting stuff. 30 'common', // components that are reused by multiple samples 31 'template'] // boilerplate code that is generated by the sample template process 32 33 android { 34 compileSdkVersion 'android-L' 35 36 buildToolsVersion '20' 37 38 buildTypes { 39 release { 40 runProguard false 41 proguardFiles getDefaultProguardFile('proguard-android.txt') 42 } 43 } 44 lintOptions { 45 abortOnError false 46 } 47 sourceSets { 48 main { 49 dirs.each { dir -> 50 java.srcDirs "src/${dir}/java" 51 res.srcDirs "src/${dir}/res" 52 } 53 } 54 androidTest.setRoot('tests') 55 androidTest.java.srcDirs = ['tests/src'] 56 57 } 58 } 59 60 // BEGIN_EXCLUDE 61 // Tasks below this line will be hidden from release output 62 63 task preflight (dependsOn: parent.preflight) { 64 project.afterEvaluate { 65 // Inject a preflight task into each variant so we have a place to hook tasks 66 // that need to run before any of the android build tasks. 67 // 68 android.applicationVariants.each { variant -> 69 tasks.getByPath("prepare${variant.name.capitalize()}Dependencies").dependsOn preflight 70 } 71 } 72 } 73 74 // END_EXCLUDE 75