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: 'android-library'
14
15repositories {
16    jcenter()
17    google()
18}
19
20
21
22// The sample build uses multiple directories to
23// keep boilerplate and common code separate from
24// the main sample code.
25List<String> dirs = [
26    'main',     // main sample code; look here for the interesting stuff.
27    'common',   // components that are reused by multiple samples
28    'template'] // boilerplate code that is generated by the sample template process
29
30android {
31    compileSdkVersion 27
32
33    buildToolsVersion "27.0.2"
34
35    defaultConfig {
36        minSdkVersion 18
37        targetSdkVersion 27
38    }
39
40    compileOptions {
41        sourceCompatibility JavaVersion.VERSION_1_7
42        targetCompatibility JavaVersion.VERSION_1_7
43    }
44
45    sourceSets {
46        main {
47            dirs.each { dir ->
48                java.srcDirs "src/${dir}/java"
49                res.srcDirs "src/${dir}/res"
50            }
51        }
52
53    }
54}
55