Skip to content

Commit 674ce38

Browse files
committed
Merge branch '6.1.x'
2 parents 15febfc + 7aa6e0d commit 674ce38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
2121

2222
class ArtifactoryPlugin implements Plugin<Project> {
2323

24+
private static final String ARTIFACTORY_URL_NAME = "ARTIFACTORY_URL"
25+
26+
private static final String DEFAULT_ARTIFACTORY_URL = "https://repo.spring.io"
27+
2428
@Override
2529
void apply(Project project) {
2630
project.plugins.apply('com.jfrog.artifactory')
2731
String name = Utils.getProjectName(project);
2832
boolean isSnapshot = Utils.isSnapshot(project);
2933
boolean isMilestone = Utils.isMilestone(project);
3034
project.artifactory {
31-
contextUrl = 'https://repo.spring.io'
35+
contextUrl = System.getenv().getOrDefault(ARTIFACTORY_URL_NAME, DEFAULT_ARTIFACTORY_URL)
3236
publish {
3337
repository {
3438
repoKey = isSnapshot ? 'libs-snapshot-local' : isMilestone ? 'libs-milestone-local' : 'libs-release-local'

0 commit comments

Comments
 (0)