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