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