plugins { id 'java' } repositories { jcenter() } dependencies { // https://mvnrepository.com/artifact/com.google.guava/guava implementation group: 'com.google.guava', name: 'guava', version: '23.0' // https://mvnrepository.com/artifact/com.google.code.gson/gson implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.2' implementation group: 'com.formdev', name: 'flatlaf', version: '0.39' } task download(type: Copy) { from sourceSets.main.runtimeClasspath into 'libs' } jar { manifest { attributes ( 'Main-Class': 'JRex' ) } } // make a fat JAR task dist(type: Jar) { manifest.from jar.manifest baseName = 'jrex' from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } destinationDir = file('dist') with jar }