1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17buildscript {
18    repositories {
19        google()
20        jcenter()
21    }
22
23    dependencies {
24        classpath 'com.android.tools.build:gradle:3.3.2'
25    }
26}
27
28apply plugin: 'com.android.application'
29
30repositories {
31    google()
32    jcenter()
33}
34
35dependencies {
36    implementation 'com.google.android.material:material:1.1.0-alpha08'
37    implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
38    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
39    implementation 'androidx.preference:preference:1.1.0-rc01'
40}
41
42// The sample build uses multiple directories to
43// keep boilerplate and common code separate from
44// the main sample code.
45List<String> dirs = [
46    'main',     // main sample code; look here for the interesting stuff.
47    'common',   // components that are reused by multiple samples
48    'template'] // boilerplate code that is generated by the sample template process
49
50android {
51    compileSdkVersion 29
52
53    defaultConfig {
54        minSdkVersion 14
55        targetSdkVersion 29
56        vectorDrawables.useSupportLibrary true
57    }
58
59    compileOptions {
60        sourceCompatibility 1.8
61        targetCompatibility 1.8
62    }
63
64    sourceSets {
65        main {
66            dirs.each { dir ->
67                java.srcDirs "src/${dir}/java"
68                res.srcDirs "src/${dir}/res"
69            }
70        }
71        androidTest.setRoot('tests')
72        androidTest.java.srcDirs = ['tests/src']
73
74    }
75
76}
77