Skip to content

Commit

Permalink
Some fixes to allow publishing libs to artifactory. Distributions sti…
Browse files Browse the repository at this point in the history
…ll broken.
  • Loading branch information
adammurdoch committed Apr 8, 2011
1 parent 690c756 commit 8ec8976
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ uploadDists {
dependsOn testedDists
uploadDescriptor = false
doFirst {
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials('Artifactory Realm', 'repo.gradle.org', artifactoryUserName, artifactoryUserPassword)
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials('Artifactory Realm', 'gradle.artifactoryonline.com', artifactoryUserName, artifactoryUserPassword)
repositories.add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'gradleReleases'
addArtifactPattern("${version.distributionUrl}/[artifact]-[revision](-[classifier]).[ext]" as String)
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/groovy/org/gradle/build/Version.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ class Version {

String getDistributionUrl() {
if (release) {
'https://repo.gradle.org/gradle/distributions'
'https://gradle.artifactoryonline.com/gradle/distributions'
} else {
'https://repo.gradle.org/gradle/distributions/gradle-snapshots'
'https://gradle.artifactoryonline.com/gradle/distributions/gradle-snapshots'
}
}

String getLibsUrl() {
if (release) {
'https://repo.gradle.org/gradle/libs-releases-local'
'https://gradle.artifactoryonline.com/gradle/libs-releases-local'
} else {
'https://repo.gradle.org/gradle/libs-snapshots-local'
'https://gradle.artifactoryonline.com/gradle/libs-snapshots-local'
}
}
}
4 changes: 2 additions & 2 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ uploadArchives {
dependsOn generatePom
uploadDescriptor = false
doFirst {
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials('Artifactory Realm', 'repo.gradle.org', artifactoryUserName, artifactoryUserPassword)
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials('Artifactory Realm', 'gradle.artifactoryonline.com', artifactoryUserName, artifactoryUserPassword)
repositories.add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'gradleReleases'
name = 'gradleLibs'
addArtifactPattern("${version.libsUrl}/${project.group.replaceAll('\\.', '/')}/${archivesBaseName}/[revision]/[artifact]-[revision](-[classifier]).[ext]" as String)
}
}
Expand Down

0 comments on commit 8ec8976

Please sign in to comment.