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
25
26    compile 'com.google.android.gms:play-services-wearable:11.8.0'
27    compile 'com.android.support:support-v13:27.0.2'
28
29    provided 'com.google.android.wearable:wearable:2.2.0'
30
31    compile 'com.google.android.support:wearable:2.2.0'
32
33}
34
35// The sample build uses multiple directories to
36// keep boilerplate and common code separate from
37// the main sample code.
38List<String> dirs = [
39    'main',     // main sample code; look here for the interesting stuff.
40    'common',   // components that are reused by multiple samples
41    'template'] // boilerplate code that is generated by the sample template process
42
43android {
44
45    compileSdkVersion 27
46
47    buildToolsVersion "27.0.2"
48
49    defaultConfig {
50        versionCode 1
51        versionName "1.0"
52
53        minSdkVersion 18
54
55        targetSdkVersion 22
56
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