plugins { id 'java' id 'maven' } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } sourceCompatibility = 1.8 targetCompatibility = 1.8 configurations.all { } sourceSets { main.java.srcDir "src/main" test.java.srcDir "src/test" } repositories { mavenCentral() } dependencies { compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' testCompile group: 'junit', name: 'junit', version: '4.12' } jar { from configurations.compile.collect { zipTree it } manifest.attributes "Main-Class": "sh.adb.sensor-community-JAVA-API.Main" }