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 20dependencies { 21 implementation 'androidx.legacy:legacy-support-v4:1.0.0' 22} 23 24// The sample build uses multiple directories to 25// keep boilerplate and common code separate from 26// the main sample code. 27List<String> dirs = [ 28 'main', // main sample code; look here for the interesting stuff. 29 'common', // components that are reused by multiple samples 30 'template'] // boilerplate code that is generated by the sample template process 31 32android { 33 compileSdkVersion 28 34 35 buildToolsVersion "28.0.3" 36 37 defaultConfig { 38 minSdkVersion 18 39 targetSdkVersion 28 40 } 41 42 compileOptions { 43 sourceCompatibility JavaVersion.VERSION_1_7 44 targetCompatibility JavaVersion.VERSION_1_7 45 } 46 47 sourceSets { 48 main { 49 dirs.each { dir -> 50 java.srcDirs "src/${dir}/java" 51 res.srcDirs "src/${dir}/res" 52 } 53 } 54 55 } 56} 57