Home | History | Annotate | Download | only in Application
      1 buildscript {
      2     repositories {
      3         jcenter()
      4     }
      5     ext.kotlin_version = '1.1.2-4'
      6     dependencies {
      7         classpath 'com.android.tools.build:gradle:2.3.0'
      8         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
      9     }
     10 }
     11 
     12 apply plugin: 'com.android.application'
     13 apply plugin: 'kotlin-android'
     14 apply plugin: 'kotlin-android-extensions'
     15 
     16 repositories {
     17     jcenter()
     18 }
     19 
     20 dependencies {
     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.
     31 List<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 
     36 android {
     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