Here is this documentation for the Groovy equivalent to Nuget.
This is a small sample:
@Grab(group=‘org.springframework’, module=‘spring-orm’, version=‘3.2.5.RELEASE’) import org.springframework.jdbc.core.JdbcTemplate
Grape does not seem to go as far as Nuget’s allowing upgrades, but it does do the configuration in the source code.