How to configure Gradle to use Nexus Token

Is there any way to configure gradle to use a nexus token instead of credentials with Username/Password?

According to Security Setup with User Tokens you have a token for the username and a token for the password, so just use them instead of real username and password and all should be well.