title: setting credentials in gradle via maven-publish
body: <p>I am using gradle v3.4 and have populated properties from a secrets.properties file (passed into project.ext) but when I use the variables in the credentials section, I get an error from nexus complianing about authentication issues which makes me believe the string interpolation is not working correctly.  I can print the variable value just before the credentials section.</p>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>        maven {
              credentials {
  println(project.nexusUsername)  //prints the value
                  username '${project.nexusUsername}'
                  password '${project.nexusPassword}'
              }
              if (project.version.endsWith("-SNAPSHOT")) {
                  url "http://nexus.somewhere.com/repository/some-java-snapshot/"
              } else {
                  url "http://nexus.somewhere.com/repository/some-java-release/"
              }
          }
  </code></pre>
  
  <p><strong>Update</strong>
  I updated the credentials section above to use double quotes (not single) but that did not solve the issue.  Single quotes are String literals - if you need String interpolation, you need to use double quotes in groovy.  </p>