Skip to content

Instantly share code, notes, and snippets.

@kostark
Created September 17, 2018 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kostark/3f4a5a621153dc78ff21ff6477d12f89 to your computer and use it in GitHub Desktop.
Save kostark/3f4a5a621153dc78ff21ff6477d12f89 to your computer and use it in GitHub Desktop.
gradle maven publish
publishing {
repositories {
maven {
credentials {
username "${artifactory_user}"
password "${artifactory_password}"
}
if ( project.version.endsWith('-SNAPSHOT') ) {
url "file:///var/tmp/myrepo/snapshot/"
} else {
url "file:///var/tmp/myrepo/release/"
}
}
}
publications {
mavenJava(MavenPublication) {
groupId 'com.mycompany.myproject'
artifactId 'myartifact'
from components.java
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment