Home | History | Annotate | Download | only in Shared
      1 
      2 buildscript {
      3     repositories {
      4         jcenter()
      5     }
      6 
      7     dependencies {
      8         classpath 'com.android.tools.build:gradle:2.1.2'
      9     }
     10 }
     11 
     12 apply plugin: 'android-library'
     13 
     14 repositories {
     15     jcenter()
     16 }
     17 
     18 
     19 
     20 // The sample build uses multiple directories to
     21 // keep boilerplate and common code separate from
     22 // the main sample code.
     23 List<String> dirs = [
     24     'main',     // main sample code; look here for the interesting stuff.
     25     'common',   // components that are reused by multiple samples
     26     'template'] // boilerplate code that is generated by the sample template process
     27 
     28 android {
     29     compileSdkVersion 24
     30 
     31     buildToolsVersion "24.0.1"
     32 
     33     defaultConfig {
     34         minSdkVersion 18
     35         targetSdkVersion 24
     36     }
     37 
     38     compileOptions {
     39         sourceCompatibility JavaVersion.VERSION_1_7
     40         targetCompatibility JavaVersion.VERSION_1_7
     41     }
     42 
     43     sourceSets {
     44         main {
     45             dirs.each { dir ->
     46                 java.srcDirs "src/${dir}/java"
     47                 res.srcDirs "src/${dir}/res"
     48             }
     49         }
     50 
     51     }
     52 }
     53