1 apply plugin: 'com.android.library' 2 3 def nonAndroidSrc = [ 4 "org/eclipse/jetty/jmx/ConnectorServer.java", 5 "org/eclipse/jetty/jmx/MBeanContainer.java", 6 "org/eclipse/jetty/jmx/ObjectMBean.java", 7 "org/eclipse/jetty/servlet/jmx/ServletMappingMBean.java", 8 "org/eclipse/jetty/servlet/jmx/FilterMappingMBean.java", 9 "org/eclipse/jetty/servlet/jmx/HolderMBean.java", 10 "org/eclipse/jetty/util/log/jmx/LogMBean.java", 11 "org/eclipse/jetty/server/jmx/ServerMBean.java", 12 "org/eclipse/jetty/server/handler/jmx/AbstractHandlerMBean.java", 13 "org/eclipse/jetty/server/handler/jmx/ContextHandlerMBean.java", 14 "org/eclipse/jetty/servlet/StatisticsServlet.java", 15 "org/eclipse/jetty/server/session/jmx/AbstractSessionManagerMBean.java", 16 "org/eclipse/jetty/security/SpnegoUserIdentity.java", 17 "org/eclipse/jetty/security/SpnegoUserPrincipal.java", 18 "org/eclipse/jetty/security/SpnegoLoginService.java", 19 "org/eclipse/jetty/server/session/JDBCSessionIdManager.java", 20 "org/eclipse/jetty/util/preventers/AppContextLeakPreventer.java", 21 "org/eclipse/jetty/util/preventers/AWTLeakPreventer.java", 22 "org/eclipse/jetty/servlet/listener/IntrospectorCleaner.java", 23 "org/eclipse/jetty/util/preventers/AppContextLeakPreventer.java", 24 "org/eclipse/jetty/util/preventers/AWTLeakPreventer.java", 25 "org/eclipse/jetty/server/session/JDBCSessionManager.java" 26 ] 27 28 android { 29 sourceSets { 30 main { 31 manifest.srcFile 'AndroidManifest.xml' 32 java.srcDirs = ["src/java"] 33 java.exclude nonAndroidSrc 34 } 35 compileOptions { 36 sourceCompatibility JavaVersion.VERSION_1_7 37 targetCompatibility JavaVersion.VERSION_1_7 38 } 39 } 40 } 41 42 dependencies { 43 compile files( 44 "lib/javax.servlet-3.0.0.v201112011016.jar", 45 "lib/jetty-util-6.1.26.jar", 46 "lib/slf4j-api-1.6.1.jar", 47 "lib/slf4j-jdk14-1.6.1.jar") 48 } 49