How do I get gradle to include jars in my Eclipse Referenced Libraries

I have done: gradle --refresh-dependencies java on cli and the proper packages will be shown. e.g. TestNG 6.5.1 on my Terminal but in Eclipse Referenced Libraries TestNG:6.3.1 will be displayed. Any hint?

It depends on how you integrate with Eclipse. If you use Gradle’s ‘apply plugin: eclipse’, run ‘gradle cleanEclipse eclipse’. If you use the STS Gradle plugin, right-click the project and choose ‘Gradle - Refresh Dependencies’.