Skip to content

Instantly share code, notes, and snippets.

@kva1966
Created November 20, 2014 04:17
Show Gist options
  • Save kva1966/149ffb74d5a2d9f6809e to your computer and use it in GitHub Desktop.
Save kva1966/149ffb74d5a2d9f6809e to your computer and use it in GitHub Desktop.
afterProject init.gradle
afterProject { p ->
p.apply plugin: 'maven-publish'
p.apply plugin: 'com.jfrog.artifactory'
p.publishing {
publications {
mavenJava(MavenPublication) {
from p.components.java
artifact p.sourcesJar
}
}
}
p.artifacts {
archives p.sourcesJar
}
p.artifactory {
publish {
contextUrl = "http://svn:8081/artifactory"
repository {
repoKey = '....'
username = "username"
password = "password"
}
defaults {
publications('mavenJava')
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment