apply plugin: 'java' repositories { mavenLocal() mavenCentral() } def version = "2.16" dependencies { runtime 'org.glassfish.jersey.containers:jersey-container-jdk-http:' + version runtime 'org.glassfish.jersey.core:jersey-client:' + version runtime 'org.glassfish.jersey.media:jersey-media-moxy:' + version runtime 'org.glassfish.jersey.containers:jersey-container-servlet-core:' + version runtime 'org.glassfish.jersey.ext:jersey-declarative-linking:' + version runtime 'org.glassfish.web:javax.el:2.2.4' } task download(type: Copy) { from sourceSets.main.runtimeClasspath into 'jersey/' }