plugins { id 'java' } group 'org.eseb' version '1.0-SNAPSHOT' repositories { mavenCentral() } dependencies { compile 'com.github.cliftonlabs:json-simple:3.1.1' } dependencies { testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' } //create a single Jar with all dependencies task fatJar(type: Jar) { manifest { attributes 'Implementation-Title': 'Gradle Jar Package', 'Implementation-Version': version, 'Main-Class': 'Application' } baseName = project.name from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } from('src/main/java'){ include 'resources/*' } with jar } test { useJUnitPlatform() }