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