Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apply plugin: 'maven-publish'
- group = 'com.example'
- version = '1.0.0-SNAPSHOT'
- ext {
- mavenUsername = project.hasProperty('mavenUsername') ? project.getProperty('mavenUsername') : ''
- mavenPassword = project.hasProperty('mavenPassword') ? project.getProperty('mavenPassword') : ''
- artifactoryRepo = version.endsWith('-SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local'
- }
- publishing {
- publications {
- example(MavenPublication) {
- artifact ('example.py') {
- extension = 'py'
- }
- }
- }
- repositories {
- maven {
- credentials {
- username "${mavenUsername}"
- password "${mavenPassword}"
- }
- url "http://maven.example.com/artifactory/${artifactoryRepo}"
- }
- }
- }
Add Comment
Please, Sign In to add comment