title: Same credentials for all repositories in Gradle
body: <p>Please, help me to find the best solution for my problem:</p>
  
  <p>In private LAN-network I have nexus repositories, and i need to use one user for getting access to repos.</p>
  
  <p>The simplest solution is to add user and password to <code>gradle.properties</code> file and in every <code>build.gradle</code> file and every repo write the same code:</p>
  
  <pre><code>maven {
          credentials {
              username "$mavenUser"
              password "$mavenPassword"
          }
          url 'https://maven.yourcorp1.net/'
     }
  
  maven {
          credentials {
              username "$mavenUser"
              password "$mavenPassword"
          }
          url 'https://maven.yourcorp2.net/'
     }
  </code></pre>
  
  <p>Where mavenUser and mavenPassword in <code>gradle.properties</code> are the same for all repositories:</p>
  
  <pre><code>mavenUser=admin
  mavenPassword=admin123
  </code></pre>
  
  <p>It's all good and works fine, but there is  a lot of duplicate code.</p>
  
  <p>Maybe you know - how in one place set same credentials for all maven repositories? I don't want to copy the same code for all repositories.</p>
  
  <p>Thanks you a lot!</p>