Created
March 7, 2019 14:46
-
-
Save jkschneider/9c8b62af75b17042cf29531e415ffe27 to your computer and use it in GitHub Desktop.
Gradle publishing to artifactory
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
plugins { | |
id 'java' | |
id 'com.jfrog.artifactory' version '4.9.0' | |
id 'org.springframework.boot' version '2.1.3.RELEASE' | |
id 'io.spring.dependency-management' version '1.0.7.RELEASE' | |
id 'nebula.maven-publish' version '9.5.0' | |
id 'nebula.release' version '9.2.0' | |
id 'nebula.info' version '5.0.0' | |
} | |
group = 'io.pivotal.spinnaker' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
// dependencies here | |
} | |
artifactory { | |
contextUrl = 'https://repo.spring.io' | |
publish { | |
repository { | |
repoKey = 'libs-spinnaker-local' | |
username = artifactoryUser | |
password = artifactoryPassword | |
} | |
defaults { | |
publications 'nebula' | |
} | |
} | |
} | |
publishing { | |
publications { | |
withType(MavenPublication) { | |
pom.withXml { | |
Node pomNode = asNode() | |
pomNode.remove(pomNode.get("dependencies")) | |
pomNode.remove(pomNode.get("dependencyManagement")) | |
} | |
} | |
} | |
} | |
tasks.release.dependsOn('artifactoryDeploy') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To do a final release:
./gradlew final
Candidate:
./gradlew candidate
Snapshot
./gradlew devSnapshot