How to send classes some (not all) of the libraries in the binary in Gradle?

Initially I needed in the binary of my project lay in addition to my classes, and even classes of some libraries.
Found a solution for Gradle:
jar {
 from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }

But it is not suitable, because this line sends the classes of all libraries that I use in binary and the result is a mess.
Now, to the point: how do I send the classes only one library in my binary? For example, the classes of the library json-simple (com.googlecode.json-simple', name: 'json-simple', version: '1.1.1)
June 7th 19 at 15:43
1 answer
June 7th 19 at 15:45
Can you?
jar {
 from {
 configurations.compile.resolvedConfiguration.resolvedArtifacts.findAll { { == 'com.googlecode.json-simple' && == 'json-simple' }
 } collect {
 it.file.with { it.isDirectory() ? it : zipTree(it) }

Find more questions by tags JavaGradle