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