apply plugin: 'com.android.library' buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' } } dependencies { implementation fileTree(dir: 'libs', include: '*.jar') } android { compileSdkVersion 28 buildToolsVersion '28.0.3' useLibrary 'org.apache.http.legacy' defaultConfig { minSdkVersion 24 targetSdkVersion 28 } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] jniLibs.srcDirs = ['libs'] } debug.setRoot('build-types/debug') release.setRoot('build-types/release') } compileOptions { sourceCompatibility = 1.8 targetCompatibility = 1.8 } }