Created
September 17, 2018 14:29
-
-
Save kostark/3f4a5a621153dc78ff21ff6477d12f89 to your computer and use it in GitHub Desktop.
gradle maven publish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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