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