title: Use Maven credentials in setting.xml with Gradle
body: <p>I have some Gradle projects, but I would like to avoid to load credentials explicitly in <code>build.gradle</code> file.
  An example of what I would like to avoid is:</p>
  
  <pre><code>        maven {
              credentials {
                  username "$maven_user"
                  password "$maven_password"
              }
              url 'https://my-maven-repo'
          }
  </code></pre>
  
  <p>I would like to avoid to have username and password fields in <code>gradle.build</code>, even if those values can be loaded from the local host for example from <code>~/.gradle/gradle.properties</code>.
  <br>
  What I would like to achieve is to load credentials from <code>~/.m2/settings.xml</code> and to specify only the maven repository url in <code>gradle.build</code>.
  <br>Is it possible to do that? I did several attempts but it looks like that Gradle ignore the credentials in <code>settings.xml</code>     </p>