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