bat-cha / gradle-plugin-git-dependencies

A Gradle Plugin to manage git repository dependencies
http://bat-cha.github.io/gradle-plugin-git-dependencies/
153 stars 24 forks source link

Undefined variables in build.gradle #22

Closed lkorth closed 10 years ago

lkorth commented 10 years ago

sonatypeUserName and sonatypePassword are not defined in build.gradle because they are presumably in your personal gradle.properties file or an environment variable. I've found myself having to add the following to get gradle to sync when developing on this plugin

uploadArchives {
  repositories {
    mavenDeployer {
      def sonatypeUserName = ""
      def sonatypePassword = ""

Perhaps you could add something like the following depending on where you are getting your username/password from.

uploadArchives {
  repositories {
    mavenDeployer {
      def sonatypeUserName = System.getenv("SONATYPE_USERNAME") ?: ""
      def sonatypePassword = System.getenv("SONATYPE_PASSWORD") ?: ""

This would make it easier for others that don't need to publish to work on this plugin.

Thanks