1buildscript {
2    repositories {
3        jcenter()
4    }
5    ext.kotlin_version = '1.1.2-4'
6    dependencies {
7        classpath 'com.android.tools.build:gradle:3.0.0'
8        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
9    }
10}
11
12apply plugin: 'com.android.application'
13apply plugin: 'kotlin-android'
14apply plugin: 'kotlin-android-extensions'
15
16repositories {
17    jcenter()
18}
19
20dependencies {
21    compile "com.android.support:support-v4:25.3.1"
22    compile "com.android.support:support-v13:25.3.1"
23    compile "com.android.support:cardview-v7:25.3.1"
24    compile "com.android.support:appcompat-v7:25.3.1"
25    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
26}
27
28// The sample build uses multiple directories to
29// keep boilerplate and common code separate from
30// the main sample code.
31List<String> dirs = [
32    'main',     // main sample code; look here for the interesting stuff.
33    'common',   // components that are reused by multiple samples
34    'template'] // boilerplate code that is generated by the sample template process
35
36android {
37    compileSdkVersion "android-O"
38    buildToolsVersion "25.0.3"
39
40    defaultConfig {
41        minSdkVersion 21
42        targetSdkVersion "android-O"
43    }
44
45    compileOptions {
46        sourceCompatibility JavaVersion.VERSION_1_7
47        targetCompatibility JavaVersion.VERSION_1_7
48    }
49
50    sourceSets {
51        main {
52            dirs.each { dir ->
53                java.srcDirs "src/${dir}/java"
54                res.srcDirs "src/${dir}/res"
55            }
56        }
57        androidTest.setRoot('tests')
58        androidTest.java.srcDirs = ['tests/src']
59
60    }
61
62}
63