1
2buildscript {
3    repositories {
4        google()
5        jcenter()
6    }
7
8    dependencies {
9        classpath 'com.android.tools.build:gradle:3.4.2'
10    }
11}
12
13apply plugin: 'com.android.application'
14
15repositories {
16    google()
17    jcenter()
18}
19
20
21
22dependencies {
23
24    implementation 'androidx.wear:wear:1.0.0'
25    implementation 'androidx.legacy:legacy-support-v13:1.0.0'
26
27
28    implementation 'com.google.android.gms:play-services-wearable:16.0.1'
29
30
31    compileOnly 'com.google.android.wearable:wearable:2.4.0'
32
33    implementation 'com.google.android.support:wearable:2.4.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 28
48
49    buildToolsVersion "28.0.3"
50
51    defaultConfig {
52        versionCode 1
53        versionName "1.0"
54
55        minSdkVersion 23
56
57        targetSdkVersion 28
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