apply plugin: 'com.android.library' buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.3' } } allprojects { repositories { jcenter() google() } } android { useLibrary 'org.apache.http.legacy' compileOptions { encoding 'ISO8859-1' sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } compileSdkVersion 26 buildToolsVersion "27.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 26 } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java { srcDirs = [ 'libs/commons-codec-1.9/src/main/java', 'libs/commons-httpclient-3.1/src/java', 'libs/jackrabbit-webdav-2.7.2/src/main/java', 'libs/slf4j-1.7.12/src/java', 'libs/tomcat-7.0.40/java', 'src' ] } resources { srcDirs = [ 'libs/tomcat-7.0.40/java', 'libs/jackrabbit-webdav-2.7.2/src/main/java' ] } } } }