compile files(‘hibernate.jar’, ‘libs/spring.jar’)
There isn’t currently an easy way to do this. You’ll have to use the hooks of the ‘eclipse’ or ‘idea’ plugin to add that information, either on the API or on the XML level. A good starting point is the Gradle Build Language Reference.