tasks.jar { enabled = true manifest { attributes["Main-Class"] = "***" } duplicatesStrategy = DuplicatesStrategy.EXCLUDE from(sourceSets.main.get().output) dependsOn(configurations.runtimeClasspath) from({ configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) } })}