Skip to content

Commit

Permalink
Merge branch '6.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohnr committed Dec 5, 2023
2 parents 15febfc + 7aa6e0d commit 674ce38
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ import org.gradle.api.publish.maven.plugins.MavenPublishPlugin

class ArtifactoryPlugin implements Plugin<Project> {

private static final String ARTIFACTORY_URL_NAME = "ARTIFACTORY_URL"

private static final String DEFAULT_ARTIFACTORY_URL = "https://repo.spring.io"

@Override
void apply(Project project) {
project.plugins.apply('com.jfrog.artifactory')
String name = Utils.getProjectName(project);
boolean isSnapshot = Utils.isSnapshot(project);
boolean isMilestone = Utils.isMilestone(project);
project.artifactory {
contextUrl = 'https://repo.spring.io'
contextUrl = System.getenv().getOrDefault(ARTIFACTORY_URL_NAME, DEFAULT_ARTIFACTORY_URL)
publish {
repository {
repoKey = isSnapshot ? 'libs-snapshot-local' : isMilestone ? 'libs-milestone-local' : 'libs-release-local'
Expand Down

0 comments on commit 674ce38

Please sign in to comment.