If you are interested you can use the 'org.linkedin.release' plugin
(https://github.com/linkedin/gradle-plugins) which is essentially trying to
solve the same use case you have:

gradle release => releases to a release repo
gradle publish => releases to a publish repo

Otherwise you can do it conditionally on a variable passed from the command
line:

gradle -PuseRemoteRepo=true

and in your build.gradle:

uploadArchives {
  if(project.hasProperty("userRemoteRepo")} {
    repositories {
       // configuration for remote
    }
  }
  else {
    repositories {
       // configuration for local
    }
  }
}

Yan
-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Upload-Artifcat-Choose-Repo-at-Runtime-tp3301268p3301698.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to