How to use LWJGL? Or: how to use native libraries?

Ok I see. Provided that you are interested in direct dependencies only, you can do:

from configurations.someConfig.files {
   it instanceof ExternalModuleDependency && it.artifacts.every { it.classifier == 'foo' }
}
 }

Cheers!