Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. // read property from local.properties file
  2. Properties local = new Properties()
  3. local.load(project.rootProject.file('local.properties').newDataInputStream())
  4.  
  5. // publish to private repository
  6. apply plugin: 'maven'
  7.  
  8. uploadArchives {
  9. def username = local.getProperty("repo.username")
  10. def password = local.getProperty("repo.password")
  11. def snapshotUrl = local.getProperty("repo.url.snapshot")
  12. def releaseUrl = local.getProperty("repo.url.release")
  13.  
  14. def url = library_version.contains("SNAPSHOT") ? snapshotUrl : releaseUrl
  15. repositories {
  16. mavenDeployer {
  17. repository(url: url) {
  18. authentication(userName: username, password: password)
  19. }
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement