Skip to content

Commit

Permalink
Merge pull request #1175 from GIP-RECIA/customize_uploadArtifactUrl
Browse files Browse the repository at this point in the history
UP-5015 - Customize upload artifact url
  • Loading branch information
ChristianMurphy committed Jun 14, 2018
2 parents 8fbb72a + 0fb4e7a commit 3247a48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle
Expand Up @@ -127,6 +127,8 @@ subprojects {
ext {
publishingUsername = project.hasProperty('ossrhUsername') ? project.getProperty('ossrhUsername') : ""
publishingPassword = project.hasProperty('ossrhPassword') ? project.getProperty('ossrhPassword') : ""
publishingRepositoryUrl = project.hasProperty('ossrhUrl') ? project.getProperty('ossrhUrl') : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
publishingRepositoryUrlSnapshot = project.hasProperty('ossrhUrlSnapshot') ? project.getProperty('ossrhUrlSnapshot') : "https://oss.sonatype.org/content/repositories/snapshots/"
}
signing {
required { gradle.taskGraph.hasTask('uploadArchives') }
Expand Down Expand Up @@ -165,7 +167,11 @@ subprojects {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
repository(url: publishingRepositoryUrl) {
authentication(userName: publishingUsername, password: publishingPassword)
}

snapshotRepository(url: publishingRepositoryUrlSnapshot) {
authentication(userName: publishingUsername, password: publishingPassword)
}

Expand Down

0 comments on commit 3247a48

Please sign in to comment.