Guest User

Untitled

a guest
Feb 14th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.83 KB | None | 0 0
  1. apply plugin: 'maven-publish'
  2.  
  3.  
  4. group = 'com.example'
  5. version = '1.0.0-SNAPSHOT'
  6.  
  7. ext {
  8.     mavenUsername = project.hasProperty('mavenUsername') ? project.getProperty('mavenUsername') : ''
  9.     mavenPassword = project.hasProperty('mavenPassword') ? project.getProperty('mavenPassword') : ''
  10.     artifactoryRepo = version.endsWith('-SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local'
  11. }
  12.  
  13. publishing {
  14.     publications {
  15.         example(MavenPublication) {
  16.             artifact ('example.py') {
  17.                 extension  = 'py'
  18.             }
  19.         }
  20.     }
  21.     repositories {
  22.         maven {
  23.             credentials {
  24.                 username "${mavenUsername}"
  25.                 password "${mavenPassword}"
  26.             }
  27.             url "http://maven.example.com/artifactory/${artifactoryRepo}"
  28.         }
  29.     }
  30. }
Add Comment
Please, Sign In to add comment