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